Sign in to follow this  
Followers 0
PeterAtkin

Multiple pings results into one output windows

3 posts in this topic

#1 ·  Posted (edited)

This is most likely a newbie question, I have a piece of code that pings multiple servers the output are displayed via the msgbox function, it seems that I have no way to get the msgbox function to receive the results live from the ping results in near real time and using the same window to which the results can then be viewed together in one window.

Ideally I would need a live output windows that has scroll and save functionally within it, as it would be possible to have many ping results within it.

the script in question that I need this functionality for is:

Func PingIt($host, $mc_name)
; thanks to martin for this little snippet, still needs a load of work but its a start..
; [url="http://www.autoitscript.com/forum/index.php?showtopic=87145&st=0&p=625229&hl=ping%20output&fromsearch=1&#entry625229"]http://www.autoitscript.com/forum/index.php?showtopic=87145&st=0&p=625229&hl=ping%20output&fromsearch=1&#entry625229[/url]

Local $foo = Run("ping.exe " & $host, @SystemDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD)

; Calling with no 2nd arg closes stream
StdinWrite($foo)

; Read from child's STDOUT and show
Local $data
While True
  $data &= StdoutRead($foo)
  If @error Then ExitLoop
  Sleep(25)
WEnd
MsgBox(64, "Debug Results for " & $mc_name, $data)
EndFunc   ;==>PingIt

I been really beating my head with this one, so any help will really be appreciated.

Edited by PeterAtkin

[topic='115020'] AD Domain Logon Script[/topic]

Share this post


Link to post
Share on other sites



This is most likely a newbie question, I have a piece of code that pings multiple servers the output are displayed via the msgbox function, it seems that I have no way to get the msgbox function to receive the results live from the ping results in near real time and using the same window to which the results can then be viewed together in one window.

Ideally I would need a live output windows that has scroll and save functionally within it, as it would be possible to have many ping results within it.

the script in question that I need this functionality for is:

Func PingIt($host, $mc_name)
; thanks to martin for this little snippet, still needs a load of work but its a start..
; [url="http://www.autoitscript.com/forum/index.php?showtopic=87145&st=0&p=625229&hl=ping%20output&fromsearch=1&#entry625229"]http://www.autoitscript.com/forum/index.php?showtopic=87145&st=0&p=625229&hl=ping%20output&fromsearch=1&#entry625229[/url]

Local $foo = Run("ping.exe " & $host, @SystemDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD)

; Calling with no 2nd arg closes stream
StdinWrite($foo)

; Read from child's STDOUT and show
Local $data
While True
 $data &= StdoutRead($foo)
 If @error Then ExitLoop
 Sleep(25)
WEnd
MsgBox(64, "Debug Results for " & $mc_name, $data)
EndFunc ;==>PingIt

I been really beating my head with this one, so any help will really be appreciated.

It sounds like this udf might help you.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

It sounds like this udf might help you.

Thanks will give it a go..


[topic='115020'] AD Domain Logon Script[/topic]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0