The ampersand doesn't seem to work to run asynchronously.
Hi Bill,
Don't ask me to explain this one, but I mashed it together using some
hints on various web sites and it does work asynchronously :-)
This is from a handler I use to ping a remote computer and it uses
the ping command but doesn't wait for the result, instead reads it
later from the file created by the command.
on startPingCheck pIP
-- delete any existing result file
put specialFolderPath("Desktop") & "/ping.txt" into tFileName
if there is a file tFileName then delete file tFileName
-- construct a command line and send it to the shell
put "ping -c1 -n " & pIP into tShellCmd
put " > " & tFileName & " 2>&1 &" after tShellCmd
get shell(tShellCmd)
-- set up routine to keep checking for the result file
-- read & parse the result when it appears
send "checkForPingFile" to me in 1 second
end startPingCheck
If anyone can explain the "2>&1" section of the command, I would be
most interested :-)
It seems to be critical but I have no idea why!
Sarah
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution