Resolved Resolved by Dave Schulpius!

Control Command Scriptstartwait In BLOCKLY Prevents The Script From Stopping.

I'm using Blockly to ControlCommand() ScriptStartWait a certain script.  It appears that once the called for script starts it cannot shut down properly.  This only happens when using ControlCommand() ScriptStartWait.  All other times the called for script starts and runs as expected.  This is a new phenomenon and does not occur with a previous version of software. This has occurred after a software revision update. Any ideas? Thankyou.

Related Hardware EZ-B v4
Related Control Movement Script


Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!


Could you post the ScriptStartWait command as it appears in Blocky?

I'm not familiar with Blocky interface or the ScriptStartWait command and how to use it. I have always used the EZ Script interface. I can't find ScriptStartWait in the EZ Script commands manual. However the "Wait" part of this command raises a flag for me. It tells me the script will wait somehow.

What is happening that you don't think the called script is not shutting down properly?

With that said I have a few thoughts: Check to see if this is the proper command you need for the result you want.  Do you need to add parameters to the ScriptStartWait command to make the script stop.  Do you need to send another command to stop the script?  Can you place a Halt() command at the end of the called script to stop it? Are you hand writing the script or picking the ControlCommand() parameters from the Cheat Sheet? Their used to be an issue with copying and pasting commands from that cheat sheet.

Good luck,


Hi Dave    Thanks for taking this on.  I'm not sure how to post an example of Blockly code. However my problem is really rather simple.    I wish to use a Script called "MANAGER" to initiate ControlCommand ScriptStartWait a Script called "Main".   When "Main" finishes running it shuts down as does "Manager" .  All good so far.

However if I attempt to shutdown Manager or Main from a Script called "Emergency" using ControlCommand ScriptStop(for Manager and Main) weird  things start to happen.  Manager reverts to "stopping" and Main simply ignores and keeps running.

I have been using "Emergency" to ControlCommand ScriptStop "Manager" and "Main" successfully until I downloaded the latest software revision. I am wondering if others maybe experiencing this problem with ContolCommand ScriptStartWait.

Than you for your time. Jack


Without seeing your project all I can guess is that this sounds like a timing problem. Remember if you are running different scripts they all start and stop at different times. ARC takes advantage of Windows threading feature. Things are not linear when running three different scripts at the same time. Just guessing here.


I remember looking at scriptstartwait in the early days of my project and I also had some issues were it did not work as I had thought it would. I think if you have the Variable monitor skill up you can see scriptstartwait command variables there, may offer some insight if you monitor it during execution.

For me I started creating my own Variables in blocky, then adding a wait fuction manually while the is variable set while the command is executing.

It was not that hard to setup, if you want to go that route and need help, let me know.


Script start wait is tricky. It was a hack at the beginning but it was never removed as it should have been. The reason is because the child scripts are out of scope from the parent script. So when you stop the main parent script, it has no way to stop the children scripts. This is because the script code is what starts the other script, not the script engine. So it’s always been this way and it’s frustrating to use because of this.

I’ll have to think on a way that this could work with changed. But I’ll have to figure something out


Dave, David, and DJ thank you all so much for your time and insight into this problem.  It has given me ideas on how to come up with a more elegant solution rather than using ScriptStartWait.  This is an example to all how a community that shares can spur others on to creating something better, more perfect.  Thank you. Jack


Thanks DJ. This is good to know. I have s couple ez scripts that use this command. So far I haven't had any problems. I'm interested to see how this works out. Thanks!


"Check to see if this is the proper command you need for the result you want." Thanks all for your suggestions. I ended up using Script Collection as the vehicle for managing a series of scripts written in both Blockly and EZScript.  I have avoided all uses of ScripStartWait with Blockly as the problem still manifests itself.  Use of ScriptStartWait on EZScript written scripts works as intended.


That’s a good solution. I’m still considering what to do for scriptstartwait. It’s like it did something wrong and it’s waiting for punishment lol