WayneA
USA
Asked
— Edited
Resolved by Dunning-Kruger!
Good Afternoon,
I know there is a ping wait command. I want the ping wait command to time out in 5 seconds.Thoughts on this are most welcomed.
Set up a RepeatUntil loop instead... It will poll the ping (as fast as you set the sleep for) for the amount of time (or number of checks set in a variable) that you specify and then exit the loop....
use a GetPing If nest to check the ping for the required value wrapped inside another IF nest which cycles for 5 seconds or a repeat until command.
Note: Script not tested nor written in ARC. Check the commands and use as a base for your script.
It's not idea and wont give exactly 5 seconds (it'll be at least 4 seconds but less than 5)
Something like this... (I just hacked this so I haven't checked the syntax)
This will loop for approx. 60 seconds
Do you need to have the Ping to restart once you stop it? If not how about a Sleep(5000) Command then a StopScript Command or Halt()? if you want to have it restart how about using a StartScript?
Or you could use two scripts; one starts the Ping, starts the second script and then pauses after 5 seconds. There would be a 5 second sleep in the second script then a Resume command. Like this:
"HoldPing script"
"PingStart script"
You may have to adjust the sleep time to your liking.
EDIT: @Rich 7 @Richard, you guys slay me. Why do I even try?
Ha, ha... And the funny thing is I learned most of this stuff from Rich.... Dave, you have a good idea... Stopping and starting a WaitforPing script via another timed script is not a bad idea...
Woah!
Thanks Guys! On a different note, Could you please explain to me the ControlCommand() script start. I would like to run several scripts upon the connection of the EZB V4.
The easy way is to click on the Cheat Sheet tab in the EZ-Script dialogue. This brings up all ControlCommands available in your project. clicking on one will add it to the script for you.
Image courtesy of DJ in a different topic
ScriptStart basically starts the script specified. ScriptStartWait does the same but the main script which calls it will hold at that line until the script started with ControlCommand has finished.
Thank You all for your quick help and feed back!