New Zealand
Asked — Edited

Automatic Load And Unload Scripts


As my projects get larger I am thinking it would be easier if I could automatically close one project file and load another from within a EZ-Script.

We can already auto start a script at application start-up but could this functionality be extended to load and execute a preselected project from within a script?

My thinking is this...

While away on holiday I worked on my bots file and saved it to Dropbox. Dropbox was synced while driving past an open wifi hotspot while touristing around.

My bot could be set to compare file timestamps and if finding a new version automatically reloads and runs his project file.

Thinking even bigger...

What about being able to load a line from the text file into the console and execute it? We can already Say and Print so what about Console ?

Skip to comments


Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.


love that idea. ill start playing with that.

Edit: I saw the browser() command and started thinking: Those websites that redirect you to another website(i call them bounce Urls)

What if you could use that to redirect it to open the other "updated" version?

or because you are using dropbox you would have to figure that out.

Just an idea.

United Kingdom

What about using the Exec( EXE/Bat File, [parameters] ) command? It may require a crude batch file (blaa, not recommended, old hat and ugly) written or an AutoHotKey application/script written and compiled (preferred option).

I think AutoHotKey can monitor files for changes and run in the background silently.

Not strictly all in ARC but a way around.

New Zealand

Yes have given that a go but agree that it is old hat and ugly.

Problem was EZ-Script got upset with multiple copies of itself running.....

May work if we can force exit ARC first before launching it again.

I have currently been using a batch file to delete the backed up autostart file then rename another file with that name. Then force a system restart which runs the new EZ-Script file

Slow and Messy but it works

Any other thoughts....?

United Kingdom

I haven't used batch files for probably around a decade now. AutoHotKey is a much better solution in my eyes. It's similar to batch files, it's a scripting language which can be compiled to an EXE, can have a nice GUI or run in the system tray... loads of other things.

While I haven't checked or tested this I am sure it can probe the running processes and a simple IF can be used to terminate ARC if it is running. Still a little messy but I don't think there is a way around a little bit of mess.

The great thing about AHK is it can be compiled to an EXE very easily, set to run and sit in the system tray and uses very little resources.

AutoHotKey Website

New Zealand


Just spent some time looking at Autohotkey and boy it has some mussel!

Thanks again for the heads up... this will allow me to automate almost anything outside the EZ-Script environment, save it as an executable and call it from within ez-script.

My A.I. project just got bigger.

United Kingdom

AHK is an amazing product and best of all it's open source. It's like I tried saying a few months back when someone made a batch file for auto loading projects, batch files are nasty, use AHK and it is so much better.

I don't know even half of what it can do yet and I've used it since it was first released (in 2003 I believe).

With some jiggery pokery you may even be able to get values from ARC and feed them in to AHK scripts, it's something I need to look in to once I have done everything else on my build so I can record and monitor everything along side what I already record and monitor in my house.

And I will correct my link now, I missed the http:// part from the url.


That's an interesting suggestion. The challenge will be with the Connection control, as it has configuration settings that are specific to the project. If the connection control goes away, there is no longer a connection. Is it okay that it disconnects?

New Zealand

Passing the variables should be as easy as writing them out to a csv file and then importing them again?

As for the the loss of connection.... My thinking was more along the lines of the bot changing b builder files according to environments. When in the workshop my robot needs to be able to do/use different things/tools in comparison the when it is interacting with me in the lounge or even office.

Say my bot notices that I have updated its ARC file it then reloads with the newer files automatically when it returns to the recharge base.

Going further still what about allowing the robot to rewrite its own script, save and then reload it as part of an updated ARC file. Eg. Self optimizing a routine so the most frequently called sections 'float' to the top is saved and reloaded self optimizing the script. (Probably not so necessary with the already optimized code in ARC but you get my drift)

And yeah yeah I know the Skynet thing.... lol