layer Posted March 2, 2005 Share Posted March 2, 2005 yellow folks, is anyone willing to test a program for me...? ive only been working on it for about a week now, on and off, no major developing, it was inspired by Sauders Mass Ping that was in chat 2 weeks ago... so, go to here: www.freewebs.com/layerscripts/ and go to the left on the NavBar and you'll see the link, but only if your willing to test it, if not, well, i dont know what to say lol thanks a bunch, and for you guys, you can either email the Comments, suggestions, bugs to me or post the here! thanks a bucnh, and make sure you read the help file first! FootbaG Link to comment Share on other sites More sharing options...
ryeguy Posted March 2, 2005 Share Posted March 2, 2005 change it to a script and ill think about it Link to comment Share on other sites More sharing options...
layer Posted March 3, 2005 Author Share Posted March 3, 2005 ehhh... i was thinking about keeping the source (even though its nothing big or special or pretty) until its non-beta, because then it would be easier for me to keep track of whats going on... ask anyone, ive never attempted to post anything malicious FootbaG Link to comment Share on other sites More sharing options...
Insolence Posted March 3, 2005 Share Posted March 3, 2005 Just post the source. It won't affect your actual source in any way...? "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
layer Posted March 3, 2005 Author Share Posted March 3, 2005 (edited) ayyy forget it, ill test it myself, then post the source when im ready (even though its worthless!)EDIT: already found a bug when using BatchFileStyle, and exiting the Command prompt, the mainloop is ignored and the gui just idles around. Edited March 3, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
layer Posted March 3, 2005 Author Share Posted March 3, 2005 (edited) here ya go, sorry for being so stuborn about it, i just anted to clean the code up for a bit so i wouldnt emabarass myself! expandcollapse popup#include <GUIConstants.au3> Global $publicIP Global $listips GetPublicIP () $main= GUICreate ("PingMe", 400, 400) $ico= FileInstall ("PingMeIcon.ico", @TempDir) GUISetIcon (@TempDir & "\PingMeIcon.ico") $menu= GUICtrlCreateMenu ("File") $item= GUICtrlCreateMenuItem ("Ping address...", $menu) $item2= GUICtrlCreateMenuItem ("Exit", $menu) $menu2= GUICtrlCreateMenu ("Help") $menu2item= GUICtrlCreateMenuItem ("About", $menu2) $listips= GUICtrlCreateListView ("Ip's/Hostanmes | Roundtrip in Miliseconds | Extended Info.", 5, 10, 330, 200) $addinp= GUICtrlCreateInput ("", 10, 270, 200, 20) $addinp2= GUICtrlCreateInput ("", 10, 320, 200, 20) $addbut= GUICtrlCreateButton ("Add IP/Hostname", 240, 287, 100, 30) $menu3= GUICtrlCreateMenu ("My IP's") $menu3item= GUICtrlCreateMenuItem ("IP 1: " & @IPAddress1, $menu3) $menu3item2= GUICtrlCreateMenuItem ("IP 2: " & @IPAddress2, $menu3) $menu3item3= GUICtrlCreateMenuItem ("IP 3: " & @IPAddress3, $menu3) $menu3item4= GUICtrlCreateMenuItem ("IP 4: " & @IPAddress4, $menu3) $menu3item5= GUICtrlCreateMenuItem ("Public IP: " & $publicIP, $menu3) $styles= GUICtrlCreateMenu ("Methods") $stylesitem= GUICtrlCreateMenuItem ("Batch File Style", $styles) $del= GUICtrlCreateButton ("Delete selected address", 240, 250) GUICtrlCreateLabel ("IP/Hostname: ", 10, 246) GUICtrlCreateLabel ("Time to wait for ping response in miliseconds: ", 10, 296) $opt= GUICtrlCreateLabel ("Optional", 10, 340) GUICtrlSetFont ($opt, 9, 3, 400, "Comic Sans MS") GUICtrlSetFont ($addbut, 8) GUISetState () Func MainLoop () While 1 $get= GUIGetMsg () Select Case $get= -3 FileDelete ("publicIP.tmp") FileDelete ("BatchFileStyle.bat") Exit Case $get= $item2 Exit Case $get= $item $ip= InputBox ("IP/Hostname", "Please enter an IP address or a hostname: ") If @error then ContinueLoop $mili= InputBox ("Ping time", "Time to wait for an answer from the provided IP/Hostname in miliseconds (1000 Miliseconds= 1 second): ") If @error then ContinueLoop $ping= Ping ($ip, $mili) If NOT @error Then GUICtrlCreateListViewItem ($ip & "|" & $ping & "|" & "Sucess", $listips) ElseIf @error Then GUICtrlCreateListViewItem ($ip & "|" & $ping & "|" & "Unknown error", $listips) ElseIf $ping = 0 Then GUICtrlCreateListViewItem ($ip & "|" & $ping & "|" & "Not pingable", $listips) ElseIf @error = 1 then GUICtrlCreateListViewItem ($ip & "|" & $ping & "|" & "Host offline", $listips) ElseIf @error = 2 Then GUICtrlCreateListViewItem ($ip & "|" & $ping & "|" & "Host unreachable", $listips) ElseIf @error = 3 Then GUICtrlCreateListViewItem ($ip & "|" & $ping & "|" & "Bad destination", $listips) ElseIf @error = 4 Then GUICtrlCreateListViewItem ($ip & "|" & $ping & "|" & "Other errors", $listips) EndIf Case $get= $menu2item MsgBox (4096, "About", "PingMe v 1.0.0 BETA is bought to you by Ryan Moore" & @CRLF & "The final date of the project was 3/02/05" & @CRLF & "And remember! 1,000 Miliseconds is 1 second!" & @CRLF & "PingMe was created with AutoIt v. 3.1.0") Case $get= $addbut $ping2= Ping (GUICtrlRead($addinp), GUICtrlRead($addinp2)) If NOT @error Then GUICtrlCreateListViewItem (GUICtrlRead ($addinp) & "|" & $ping2 & "|" & "Sucess", $listips) ElseIf @error Then GUICtrlCreateListViewItem (GUICtrlRead ($addinp) & "|" & $ping2 & "|" & "Unknown error", $listips) ElseIf $ping2 = 0 Then GUICtrlCreateListViewItem (GUICtrlRead ($addinp) & "|" & $ping2 & "|" & "Not pingable", $listips) ElseIf @error = 1 then GUICtrlCreateListViewItem (GUICtrlRead ($addinp) & "|" & $ping2 & "|" & "Host offline", $listips) ElseIf @error = 2 Then GUICtrlCreateListViewItem (GUICtrlRead ($addinp) & "|" & $ping2 & "|" & "Host unreachable", $listips) ElseIf @error = 3 Then GUICtrlCreateListViewItem (GUICtrlRead ($addinp) & "|" & $ping2 & "|" & "Bad destination", $listips) ElseIf @error = 4 Then GUICtrlCreateListViewItem (GUICtrlRead ($addinp) & "|" & $ping2 & "|" & "Other errors", $listips) EndIf Case $get= $menu3item GUICtrlSetData ($addinp, "", "") GUICtrlSetData ($addinp, @IPAddress1, 1) Case $get= $menu3item2 GUICtrlSetData ($addinp, "", "") GUICtrlSetData ($addinp, @IPAddress2, 1) Case $get= $menu3item3 GUICtrlSetData ($addinp, "", "") GUICtrlSetData ($addinp, @IPAddress3, 1) Case $get= $menu3item4 GUICtrlSetData ($addinp, "", "") GUICtrlSetData ($addinp, @IPAddress4, 1) Case $get= $menu3item5 GUICtrlSetData ($addinp, "", "") GUICtrlSetData ($addinp, $publicIP, 1) Case $get= $del GUICtrlDelete(GUICtrlRead($listips)) Case $get= $stylesitem BatchFileStyle () EndSelect WEnd EndFunc MainLoop () Func GetPublicIP () ProgressOn ("Getting IP...", "Getting the public IP address needed...") InetGet("http://www.whatismyip.org", "publicIP.tmp") ProgressSet (25) $publicIP = FileReadLine("publicIP.tmp") ProgressSet(50) ProgressSet(75) FileDelete("publicip.tmp") ProgressSet (100) ProgressOff () EndFunc Func BatchFileStyle () $ip= InputBox ("IP/Hostname", "Please enter an IP address or hostname to ping:") If @error then MainLoop () $milisecs= InputBox ("Time", "Please enter the amount of miliseconds to wait for a response: ") If @error then MainLoop () FileWriteLine ("BatchFileStyle.bat", "title BatchFileStyle by PingMe") FileWriteLine ("BatchFileStyle.bat", "echo off") FileWriteLine ("BatchFileStyle.bat", "cls") FileWriteLine ("BatchFileStyle.bat", "Ping " & $ip & " -w " & $milisecs) FileWriteLine ("BatchFileStyle.bat", "pause") Run ("BatchFileStyle.bat") WinWait ("BatchFileStyle by PingMe") WinWaitClose ("BatchFileStyle by PingMe") FileDelete("BatchFileStyle.bat") MainLoop () EndFuncexcept your prob gonna get errors about the picture like GUISetIcon, just delete those lines, you dont need them.. only the compiled versionEDIT: could someone tell me if they get the right result returned for the if @error = 2 then blha blah because i havent really been able to test it because none of my IP's are down or nothing... so if someone could test that, that'd be great! thanks! EDIT2: maybe Ping doesnt allow this... but i cant do things with prots like :27015 in them even if you remove it, although its a Couter-Strikes 1.6 servers IP so i guess that may have things to do with it? oh well Edited March 3, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
MHz Posted March 3, 2005 Share Posted March 3, 2005 Very nice, Layer. Seems to be working ok. I find your indenting style amusing. Get the next Scite4Autoit3 full installer, to correct that bug. Tip: Consider using Tidy to correct this script. If you use Tidy to also document, you will see 2 unused variables ($ico and $main). Keep creating these cool programs. Link to comment Share on other sites More sharing options...
DirtyBanditos Posted March 3, 2005 Share Posted March 3, 2005 here ya go, sorry for being so stuborn about it, i just anted to clean the code up for a bit so i wouldnt emabarass myself! huhu layer i have test it works very fine for me,great job have you made Link to comment Share on other sites More sharing options...
layer Posted March 3, 2005 Author Share Posted March 3, 2005 thanks both of you, MHz and DirtBanditos, and MHz ill take your advice, but i gotta run right now! got school cya later FootbaG Link to comment Share on other sites More sharing options...
Steph Posted March 3, 2005 Share Posted March 3, 2005 Along the same lines, I did this to keep an eye on a dodgy wireless connection - then went over the top because I enjoyed playing. Mine only pings one location, but updates it's tray icon to show current status and tray tips to show changes in status. It minimises to the tray and will plod happily along in the background updating the icon. It needs Holger's tray stuff to work (from http://www.hiddensoft.com/fileman/users/public/Holger/). It saves preferences in the registry. This works on XP, not sure about other versions so if anyone can report what goes on that would be great.Like the way your one does multiple IPs Layer.StephPingIt_2.2.au3 Link to comment Share on other sites More sharing options...
layer Posted March 3, 2005 Author Share Posted March 3, 2005 lol, i was gonna name mine PingIt believe it or not... but i decided PingMe, good thing hmm, maybe ill make mine update itself, i dont mean maybe, i mean i will, and im starting to add support for how Saunders Mass Ping can ping like multiple addresses at once without typing em all in! FootbaG Link to comment Share on other sites More sharing options...
b14ck Posted March 5, 2005 Share Posted March 5, 2005 Mass Ping sounds fun =) Like the old style DoS. -I am the giver of life and the bringer of death. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now