Australia
Requested

Disabling Button In Interface Builder


Completed
This feature request has been completed. Install the latest ARC Pro to experience the newest features and bug fixes.

Get ARC Pro

Is there any way of disabling buttons on the Mobile Interface when a script is running? My robot has real issues when kids press one button, then another and another in quick succession. I have tried setting a variable such as $ScriptRunning to 1 when a button is pressed, and then skipping to the end of code if another button is pressed when this value is still 1. In other words, the script for a button only executes when $ScriptRunning = 0. But even this doesn't always work when the Stop button is pressed repeatedly and more buttons pressed in between. Being able to lock all buttons would be ideal. Any ideas would be appreciated.


Related Hardware EZ-B v4

ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

PRO
Synthiam
#1  

Think I have a solution that will work for you. Stay tuned

PRO
Australia
#2  

BTW, the kids I am referring to are school groups, notorious for ignoring whatever you tell them.

PRO
Synthiam
#3  

Sounds like man-kind in general :)

PRO
Synthiam
#4  

Here you go: https://synthiam.com/Products/ARC/Releases/ARC-2021-03-19-00-Early-Access-Runtime-20439

PRO
Australia
#5  

This will be perfect for what I need. Using a combination of button attributes, users will only be able to operate one button at a time. Well done with this new feature. Thanks again.

PRO
Australia
#6  

Just tried this feature in the new release. Got this error after running my code...

SCRIPT:  ControlCommand("Interface2", "visible", "Floss", false)

RESULT: Start

Error on line 9: ControlCommand Error for 'Interface2' sending 'visible'. String was not recognized as a valid Boolean. Done (00:00:00.0157794)

Is there something I need to do to get this new feature working?

PRO
Synthiam
#7   — Edited

Is that EZ-Script? I believe it is because the word false needs to be in quotes, such as this...


ControlCommand("Interface2", "visible", "Floss", "false")

EZ-Script can be a bit of a pain to work with IMO. I generally prefer JavaScript because it's much faster.

Here's an example: User Interface Example Project.EZB

PRO
Australia
#8  

Yes, the quotes work. I thought I'd tried that but obviously not correctly. Thanks.