RunWait not recognized as internal or external command

Hi, I hope you can help me with this. I wrote a simple bat. file using the USCCMD command to operate a few servos but was experiencing some problems with USCCMD blowing up which I believe is caused by more than one USCCMD running at once. I saw here in the forums about using the RunWait command but when I try and use it, I get, “runwait” not recognized as an internal or external command.


RunWait is a command from AutoHotkey, so it won’t work in a batch file. I do not think batch files run the next line until the current line has finished running. Can you post the simplest batch file that exhibits the problem? Do you also have the Maestro Control Center open? If you do, that could be what is causing the problem. You cannot have the control center connected to the Maestro at the same time you are running usccmd.

- Ryan

No, I don’t have the Maestro Control Center open but there are times when two seperate applications could be executing a USCCMD at the same time, which is most likely the cause. I have tried using the SLEEP command which seems more like a bandaid fix.

You need a mutex that prevents the different scripts from running usccmd at the same time. Here is some example file-based mutex batch file code for how you might do it.

- Ryan