Forum | | | | - Page 1 - |
| Penguin Tux | Hi,
i want me ersteinmal present. my name is Tony, i'm 15 years old and visit a six-year secondary school in Chemnitz. Since I now Sommerferien have what about me nothing moreover To do have, have I me undertaken one small Netzwerkanalysetool To write. on the Search after a einfachen Programming-Language be I on XProfan punched.
I have everything nötige gedownloaded and installs, connect have I to one Pingcode sought and I this:
declare pingstring$,ping$,ping%
********************************************************************
Proc Ping
Parameters nic$,pingdatei1$,pingdatei2$
let pingstring$="PING.EXE",nic$,">",pingdatei1$
Assign #6,pingdatei2$
Rewrite #6
Print #6,pingstring$
Close #6
WinExecwait(pingdatei2$,0)
Assign #5,pingdatei2$
Erase #5
ASSIGN #3,pingdatei1$
RESET #3
Ping%=0
WHILENOT EOF(#3)
input #3,ping$
ping$=mid$(ping$,1,11)
case equ$(ping$,"Antwort von"):Ping%=1
WEND
CLOSE #3
Assign #1,pingdatei1$
Erase #1
ENDPROC
********************************************************************
Description:
it gives of course already a speedy and nice Onlineabfrage über API,
but unfortunately gives The function only 1 for Online back, if
one über one Standart DFÜ eingewählt is.
These procedure is hold only something slower but one can even DSL
(means - no DFÜ-link) or the old T-Online u.s.w inquire!!
everything with one star umrandete is important for The request
Rolf cook - Rokosoftware - Koblenz 2002
BEISPIEL
WINDOWSTYLE 31
Window 200,200-300,80
Windowtitle "Onlinstatus-check without Api"
Text Color RGB(0,0,255),-1
UseFont "TIMES NEW ROMAN",20,10,0,0,0
DRAWTEXT 40,10,"..momentum ermittele!"
HIER JETZT THE AUFRUF THE PROZEDUR:********************
PING ADRESSE,ERGEBNISDATEI,BATCHDATEI
Parameter
1.) Webadresse - a always available How www.nic.de
2.) Dateiname, in which Pingergebnis written becomes - becomes again deleted!
3.) Dateiname, circa Ping correctly aufzurufen. - becomes again deleted!
********************************************************
Text Color RGB(255,255,255),RGB(255,255,255)
DRAWTEXT 40,10," "
UseFont "TIMES NEW ROMAN",25,20,1,0,0
Text Color RGB(0,0,255),-1
Ping "192.168.0.7","PINGTEST.TXT","PING.BAT"
if equ(ping%,1)
DRAWTEXT 25,10,"Erreichbar"
else
DRAWTEXT 25,10,"Nicht erreichbar"
endif
waitinput
Diesen code have I me to my Bedürfnissen zurechtgeschnitten and it sees How follows from. moreover should I The of me ausgedachte Funktionsweise explain.
its planned, I one Tool write, which possible simply a first Help for schoolboy and teacher bid. notice one User the it none Internetzugang has, lead it the Tool from, which the row to first whom Server anpingt, then a others Client the network and then yet a computer of outside (z.B. Date). If it with of/ one the steps no feedback gives, should a Message with hints to removal on the Bildschrim attend.
now to that code:
declare pingstring$,ping$,ping%
Proc Ping
Parameters nic$,pingdatei1$,pingdatei2$
let pingstring$="PING.EXE",nic$,">",pingdatei1$
Assign #6,pingdatei2$
Rewrite #6
Print #6,pingstring$
Close #6
WinExecwait(pingdatei2$,0)
Assign #5,pingdatei2$
Erase #5
ASSIGN #3,pingdatei1$
RESET #3
Ping%=0
WHILENOT EOF(#3)
input #3,ping$
ping$=mid$(ping$,1,11)
case equ$(ping$,"Antwort von"):Ping%=1
WEND
CLOSE #3
Assign #1,pingdatei1$
Erase #1
ENDPROC
WINDOWSTYLE 31
Window 200,200-500,80
Windowtitle "Onlinstatus-check without Api"
Text Color RGB(0,0,255),-1
UseFont "TIMES NEW ROMAN",20,10,0,0,0
DRAWTEXT 40,10,"..momentum ermittele!"
Text Color RGB(255,255,255),RGB(255,255,255)
DRAWTEXT 40,10," "
UseFont "CANDARA",25,20,1,0,0
Ping "127.0.0.1","PINGTEST.TXT","PING.BAT"
if equ(ping%,1)
Text Color RGB(0,255,0),-1
DRAWTEXT 25,10,"Server Erreichbar"
else
Text Color RGB(255,0,0),-1
DRAWTEXT 25,10,"Server not erreichbar"
endif
Ping "192.168.0.1","PINGTEST.TXT","PING.BAT"
if equ(ping%,1)
Text Color RGB(0,255,0),-1
DRAWTEXT 25,10,"Client Erreichbar"
else
Text Color RGB(255,0,0),-1
DRAWTEXT 25,10,"Client not erreichbar"
endif
Ping "www.google.de","PINGTEST.TXT","PING.BAT"
if equ(ping%,1)
Text Color RGB(0,255,0),-1
DRAWTEXT 25,10,"Google Erreichbar"
else
Text Color RGB(255,0,0),-1
DRAWTEXT 25,10,"Google not erreichbar"
endif
waitinput
One trouble, which itself to Time auftut, is the fact the the Fensterinhalt not gelöcht becomes. that is the "Server Erreichbar", "Client Erreichbar" and "Google Erreichbar" übereinander written go, means need I a Possibility whom Content the Fensters to each step To delete. thereby be on
punched. Nutze I these Possibility to or. to "Server Erreichbar" becomes "Server Erreichbar" none displayed.
for a small Hilfestellung would I very grateful.
thanks Tony |
| | | | |
| | | | - Page 5 - |
| | | Penguin Tux
the ENDPROC missing in a File, The in the Ordner of ROC lying. and on the have I nothing made. means must on something anderem lying.
the shining you vlt. only so, zeig time whom code... (Codes can too simply to [...] Upload - then custom one here in whom Posts solely The URL to that code leave behind. ) |
| | | | |
| | Penguin Tux | whom code?
this is the from the besagten File:
momentum... [...] |
| | | | |
| | Jörg Sellmeyer | Hm, you have nothing on the code changed, or in the ROC-Ereigniseditor association? then must Rolf well time ran. the here can naturally not functions: CompileMarkSeparation
PROC DIALOG ---------------------------------------------------------------------------> Dialoganfang
DECLARE DLG&, DIALOGENDE%
DECLARE TEXT1&
DECLARE BUTTON1&
PROC DIALOG ---------------------------------------------------------------------------> Dialoganfang
DECLARE DLG&, DIALOGENDE%
DECLARE TEXT1&
DECLARE BUTTON1&
PROC DIALOG ---------------------------------------------------------------------------> Dialoganfang
DECLARE DLG&, DIALOGENDE%
DECLARE TEXT1&
DECLARE BUTTON1&
PROC DIALOG ---------------------------------------------------------------------------> Dialoganfang
DECLARE DLG&, DIALOGENDE%
DECLARE TEXT1&
DECLARE BUTTON1&
DLG&=CREATE("DIALOG",%HWND,"Neues Fenster",51,135,640,500)
USEFONT "MS Sans Serif",13,0,0,0,0
SETDIALOGFONT on class=s2>1
Nochmal ne question: what expect You you of this procedure? CompileMarkSeparation there becomes namely very nothing occur. |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 07/21/08 ▲ |
| |
| | Rolf Koch | *lol* no so How supra The Dialogproc looks, Have I the but not program. If it still so ausgespuckt would, watts me jahrelang no Rückinfo given what about me progge ROC still only for Katz. |
| | | | |
| | Rolf Koch | So I Have now with Roc even over the Actionwriter (Ereigniseditor) and without time a supra ähnlichen dialog prepares and by me comes not such one Errorcode out. |
| | | | |
| | Dieter Zornow | @Rolf the I had already, the happens usually if You many items again löschst, then can so one code rauskommen. Try too time a Choicebox To move, then is tappt im dunkeln lane. |
| | | Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 07/21/08 ▲ |
| |
| | Rolf Koch | I see, is correctly. beautiful, that one something like time said get. Nachtrag: I create create create destroy destroy destroy and everything remaining by me correctly. Shit. too The Choicebox schieben and schieben and everything remaining in the green area. |
| | | | |
| | Penguin Tux | Jörg Sellmeyer
Nochmal ne question: what expect You you of this procedure? CompileMarkSeparationthere becomes namely very nothing occur.
by the pressing of OK should the Hilfefenster again closed go,. but if the so not functions, How then?
I have whom ROC-Ordner now simply time deleted and it nocheinmal from the ZIP herausgeholt, The File is now lane - time see whether it now what becomes.
Edit: I can my Window now testing, thanks. now must I only yet find out How to the Window through clicking of "OK" again close can. |
| | | | |
| | | | | | | |
| | Rolf Koch | or directly to that dialog properly: CompileMarkSeparation there the dialog closed go should, benötigst You here no Waitinput and Co. How You on the Loop see CompileMarkSeparation as long as Variable dialogende% on 0 standing becomes these Loop go through. setting You now Dialogende% on 1 is the circumstance to that dialog terminate gebeben and the Loop becomes leave.
complement the following on the Schluss, I of it ausgehe, that the dialog as Hilfefenster on the Mainwindow prepares watts: CompileMarkSeparation |
| | | | |
| | Penguin Tux | CompileMarkSeparation so goes not: CompileMarkSeparation Ah, thanks Rolf, now functions it.
Edit: with "Def @Show(1) @ShowWindow(@&(1), 1)" ,üsste I it still hinbekommen, the my Window displayed becomes, it happens but again nothing. |
| | | | |
| | | @Tony: You must but too The Help once correctly. reading! DestroyWindow(0) can't functions - look correctly. to! |
| | | | |
|
AnswerTopic-Options | 23.582 Views |
Themeninformationenthis Topic has 9 subscriber: |