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 4 - |
| | Stefan Landsberg | @dietmar super then lad I me whom time quick down.
@tony thanks for encouraging schadenfreude
No jest
@all somehow Have I the feeling that tony what about me here The half-way community on trab hold I hope the takes us none ill! |
| | | | |
| | Penguin Tux | CompileMarkSeparationdeclare 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,180
Windowtitle "PiRePro by penguin"
TextColor RGB(0,0,255),-1
UseFont "TIMES NEW ROMAN",20,10,0,0,0
DRAWTEXT 40,10,"..moment ermittele!"
TextColor 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)
TextColor RGB(0,255,0),-1
DRAWTEXT 25,10,"Server Erreichbar"
else
TextColor RGB(255,0,0),-1
DRAWTEXT 25,10,"Server Nicht erreichbar"
endif
Hier Code für Fehlermeldung/Tipbox
Ping "192.168.0.1","PINGTEST.TXT","PING.BAT"
if equ(ping%,1)
TextColor RGB(0,255,0),-1
DRAWTEXT 25,40,"Client Erreichbar"
else
TextColor RGB(255,0,0),-1
DRAWTEXT 25,40,"Client Nicht erreichbar"
endif
Hier Code für Fehlermeldung/Tipbox
Ping "www.google.de","PINGTEST.TXT","PING.BAT"
if equ(ping%,1)
TextColor RGB(0,255,0),-1
DRAWTEXT 25,70,"Extern Erreichbar"
else
TextColor RGB(255,0,0),-1
DRAWTEXT 25,70,"Extern Nicht erreichbar"
endif
Hier Code für Fehlermeldung/Tipbox
Hier Code für Meldung des Erfolgs
TextColor RGB(0,0,0),-1
UseFont "CANDARA",15,10,1,0,0
DRAWTEXT 25,120,"Zum Beenden drücken Sie bitte eine beliebige Taste&quo on>
waitinput
Have "Zum terminate pressing tappt im dunkeln Please a arbitrary Taste" time something schöner configures.
i'll time moreover to Ner Opportunities search left To settle. |
| | | | |
| | Stefan Landsberg | so jetz is the font rather. question: what should really The request of 127.0.0.1 bring. as far as i know is the the Own pc and therefore IMMER accessible.
i'm with my Program steckengeblieben because I do not white where I go on should. I Have jetz whom object creator and Have so one window configures. but I with the code of it make should white I do not. I know neither How I contents of textfeldern request or buttons functions zuordne. |
| | | | |
| | Penguin Tux | These IP`sind too only Test-IP`s The The Funktionalität show should. I could now too The IP the Servers the school reinschmeißen, the brungt by me To dwell Yes nothing.
as long as I do not white whether with the whom left goes, try I again on nem Window.
If I the window ready Have, Have I still a code whom I my View source insert must the would I on the dearest with "if" make, there itself the window Yes only open should, if z.B. "Server NIcht Erreichbar" is.
what must I for write?
Edit: I have me now consider me ROC one Window To building, which on The Helpfile verlinkt, but moreover need I Yes again The function to that Verlinken on a *.doc File. in the internet have so did i nothing found, now custom I really time Help *liebguck* |
| | | | |
| | Stefan Landsberg | already clear, that The (interne) ip the schulservers jetz nothing bring. I thought bloss You wanted the Program then of these ips compilieren. but if You tappt im dunkeln before änderst is the Yes what other
to that verlinken: i think time the goes on the simplest a button. How the very goes try ih but too rauszufinden.
and ne doc File would I then only take if on all pcs the school guaranteeing word on it is. ne alternative would (simply) one window To make and there whom Text einzufügen (something like ähnliches How ne messagebox). |
| | | | |
| | Penguin Tux | good tommorrow Stefan,
Word or. OpenOffice is on all Rechnern installs, but everything in a Messagebox To stick, stops I letztendlich too for sinnvoller.
I write means everything into Window and write as action for Button simply "waitinput", the should Yes then the window close.
Edit: I need nocheinmal Help at arrange of ROC. on the beginning will be ihc to the Standartinterpreter and some others Settings demand. now white I do not where I the Interpreter find and which the others Options I best dial. |
| | | | |
| | Stefan Landsberg | so can mans make. and circa your question to the if request To answer, The should in my humble opinion CompileMarkSeparation or CompileMarkSeparation lauten.
whom interpreter find You in the installationsverzeichnis of (x)profane. where the with you is white I do not. usually in the ordner Crogramme*here the name the profane ordners* |
| | | | |
| | Penguin Tux | I have The idea with the "if" ersteinmal with Page shoved, because it still unnecessary would. as long as I "if/else" have can I the window still too yet To "else" write. If I now Mist tells have, freue I naturally if me someone correct.
Edit: whom Interpreter have I now found. wants I but my Window testing, I get a Error Message (its yet The Version from the Hilfedokumenten):
Image: [...] |
| | | | |
| | Jörg Sellmeyer | Tja, sees from, as though D u somewhere one ENDPROC forget have. on your place would I sooner another little "zu Fuß" program, and the window without grafically Help set up. thereby learn You More, as if You, the Program zusammenklickst. If you it still make, look you whom begot code very on. there can You a crowd over The Strukturierung one Program learn. Greeting Jörg |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 07/21/08 ▲ |
| |
| | 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. |
| | | | |
| | | @Tony: Files (How z.B. too Images) Please here Upload, with Drittanbietern is me always unclear How long the Content gehostet and is in which quality. You can over the Beitrageditor so plenty Upload How You want, what too whom benefit has, that You a Download-Counter displayed get. |
| | | | |
| | Penguin Tux | i'll it me remember |
| | | | |
|
AnswerTopic-Options | 23.590 Views |
Themeninformationenthis Topic has 9 subscriber: |