ConsultingJoe Posted April 3, 2006 Share Posted April 3, 2006 Let me know what you guys think. I want to make it so it creates a gui and draws out the routes and hops. That would be cool. filedelete( @tempdir & "\output.txt" ) $ip = InputBox( "TRACERT", "Enter Site or IP", "www.yahoo.com" ) $hops = InputBox( "TRACERT", "Enter Hops", 15 ) $timeout = InputBox( "TRACERT", "Enter Timeout in miliseconds", 100 ) TrayTip( "TRACERT", "Processing, Please Wait", 5, 16) RunWait (@ComSpec & " /c " & "tracert" & " -d " & "www.yahoo.com" & " -h " & $hops & " -w " & $timeout & " >> " & @tempdir & "\output.txt", "", @SW_HIDE) $output = FileRead( @tempdir & "\output.txt" ) filedelete( @tempdir & "\output.txt" ) $output = StringStripCR ( $output ) msgbox(0,"Tracert Complete",$output) Is there something else I could add? let me know Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
ConsultingJoe Posted April 4, 2006 Author Share Posted April 4, 2006 I saw the amazing neotrace, wouldn't it be great if this was like that Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
billmez Posted April 5, 2006 Share Posted April 5, 2006 Let me know what you guys think. I want to make it so it creates a gui and draws out the routes and hops. That would be cool. filedelete( @tempdir & "\output.txt" ) $ip = InputBox( "TRACERT", "Enter Site or IP", "www.yahoo.com" ) $hops = InputBox( "TRACERT", "Enter Hops", 15 ) $timeout = InputBox( "TRACERT", "Enter Timeout in miliseconds", 100 ) TrayTip( "TRACERT", "Processing, Please Wait", 5, 16) RunWait (@ComSpec & " /c " & "tracert" & " -d " & "www.yahoo.com" & " -h " & $hops & " -w " & $timeout & " >> " & @tempdir & "\output.txt", "", @SW_HIDE) $output = FileRead( @tempdir & "\output.txt" ) filedelete( @tempdir & "\output.txt" ) $output = StringStripCR ( $output ) msgbox(0,"Tracert Complete",$output) Is there something else I could add? let me know This will send the output directly to an edit control, and includes a function to abort the trace by pressing escape. This is from an earlier program I released in this forum, Client Network Utility. Note $timeOut setting and $ClientWeb destination variables. Opt("GUICloseOnESC", 0) HotKeySet("{Esc}", "abortTrace") GUICtrlSetData($Edit1, "Tracing Route To: " & $ClientWeb & " - press Escape to quit" & @crlf, 1) Sleep(1000) $trinfo = Run(@ComSpec & " /c tracert -h 30 -w " & $timeOut & " " & $ClientWeb, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $line = StdoutRead($trinfo, -1) If @error = -1 Then ExitLoop Else GUICtrlSetData($Edit1, $line, 1) EndIf Wend Func abortTrace() GUICtrlSetData($Edit1, @crlf & @crlf & "Command Aborted" & @crlf, 1) $line = "" $trinfo = "" SetError(-1) HotKeySet("{Esc}") EndFunc Link to comment Share on other sites More sharing options...
ConsultingJoe Posted April 5, 2006 Author Share Posted April 5, 2006 I get an error on the edit Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
billmez Posted April 5, 2006 Share Posted April 5, 2006 I get an error on the editYou need to build the gui and add the edit control. Also make this a function and call it somehow. You can download the full program script here: http://www.autoitscript.com/forum/index.ph...topic=21857&hl=Note: the exit function was added after the release of this script. Link to comment Share on other sites More sharing options...
ConsultingJoe Posted April 5, 2006 Author Share Posted April 5, 2006 Oh ok, I remeber this, nice job. I thought it would be cool to have it find every pc within a small LAN or WAN. I found neotrace and Gave up Check out ConsultingJoe.com 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