Asked — Edited
Resolved Resolved by Rich!

Run A Script From Within A Windows Batch File?


Is is possible to open the ARC in the background and run a script - all at once, from within a windows batch file?

Thanks, Roi.


Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

United Kingdom

Yes, however batch files are old hat and messy, you are better off looking at how much more powerful and easier AutoHotKey is.

But to answer the question, regardless of method, you can create a shortcut using ARC's shortcut creator which can specify a single script to run on load. You can then use ControlCommand() to trigger other scripts.

The shortcut basically runs "Path to ARC.exe" "Path to Project.ezb" "Script to run on load"

for example

"C:\Program Files\EZ-Robot Inc\ARC.ARC.exe" "C:\Users\Rich\Documents\ARC.melvin.EZB" "autoconnect"

However, without the required switches this will not run silent in the background this is why AutoHotKey is probably the better method, details of how to use AutoHotKey are documented very clearly on their website and there are a lot of examples on their forums.


Hey Rich!

Thanks a lot!


United Kingdom

Not a problem. Don't forget to mark this as solved if it has been :)


One more question, Rich:

The other "old hat" way - if i understand correctly, the command prompt line will run the script, only if a "connection is established"? Otherwise, i don't understand why the ARC is being opened by the command line batch file - but then, the script itself will not be executed. Is there a way to bypass this "connection must be established" mandate? if not, is there a way to make a connection established automatically, before the script is executed?

United Kingdom

The shortcut (or commandline whatever) will open ARC It will open the project specified It will run the script specified on load

Connection does not need to be established. The script is run on load.

If connection is required before running the script then simply do what I have done with Melvin and have it run an auto connect script, this will attempt connection on load. You can specifiy another script to run on successful connection in the connection options dialogue within ARC.


Rich, OK - here is a more detailed rephrasing of my question:

you gave me this example: "C:\Program Files\EZ-Robot Inc\ARC.ARC.exe" "C:\Users\Rich\Documents\ARC.melvin.EZB" "autoconnect" - but it seems that the problem is, that the ARC, after it is opened, is expecting first the name of the window that resides on the ARC desktop and only then, the name of the script. So, in your example, i guess "autoconnect", is the name of the script? or of the window? isn't the window name in this case of executing a script, supposed to always be "Script Manager" ?

But, i have tried: "Path to ARC.exe" "path to EZB project file" "Script manager" "name of script"

and i tried: "Path to ARC.exe" "path to EZB project file" "Script manager, name of script"

and i tried: "Path to ARC.exe" "path to EZB project file" "Script manager" name of script

and i tried: "Path to ARC.exe" "path to EZB project file" "Script manager name of script"

But, as they say, alas! no one of them executed the script.

Can you tell me what i am doing wrong?

Thanks, Roi.

United Kingdom

It has to be a script which isn't in script manager if memory serves me correctly.


How do i create a script that isn't in the script manager?

United Kingdom

Add a control Choose the Script tab Select Script

It's the first one on the list if memory serves me correctly


Got it! It works at last - according to your instructions!

I wasn't aware of the possibility to open a one script window - although it is the first control on the script tab list....

Thanks a lot!