Asked — Edited

How To Make Image Button Stay Color Until Direction Change?

This is just a question about something I came across.

When using an image button in the ARC mobile interface, if you make the script "forward()", It doesn't change to the running color.

If I add a sleep, it will change color until the sleep is done, regardless of a direction change.

I tried the following script with no prevail.

If ($direction = "forward")

Any ideas?


Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.


Take a look at any of the examples for roli, JD or six


Thanks, I didn't realize there was a mobile variable set.

United Kingdom

There isn't. The variable is set in the code. Similar code is used on other directions so when a different direction is called for the variable changes and the script stops running therefore causing the image to return to the default image rather than the running image.

As DJ said, check the examples for Roli, JD and Six, they all use this method.


Also, if your robot does not use an HBridge or additional movement panel... And by that I guess I should elaborate.. The AutoPosition comes in two flavors, one with and one without a movement panel.

So, if you are using the AutoPosition, and would like to keep the last action button pressed, do this..

ControlCommand("Auto Position", AutoPositionAction, "Fast-Forward")


Yea I realized that after I posted. Thanks rich.

Thanks for the info DJ.