, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here
I wrote a post a short while back asking DJ if he would consider adding a "When button is released" script input field to the mobile interface, and he very kindly said the he would add it to his "to do" list.
So in the mean time I have been playing around to see if I could I could script something similar, but so far have had no luck. The only thing I could come up with is the following...
IF(GetServo(D19) < 120)
ElseIf(ControlCommand("Script Manager", ScriptStop, "Head LEFT"))
What this does is when a mobile control button is pressed/pressed and released, it will (for example) move a servo, and when the same button is pressed again the servo will stop. Not quite what I want to do. Has anybody got any ideas of how to do this or has a script example you would be willing to share?
I would be happy to wait for an EZ Builder update to include this, but I have had a couple of near accidents where I take my eyes off my phones screen for a second and haven't been able to hit the stop button that I have, in time. Having this option would solve this issue and I could do away with the stop button altogether.
I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.
Also, consider reviewing the Learn section for informative lessons and activities.
Check it out!
There is currently no support for cross-platform "button release" events. When a newer update for the mobile device sdk supports it, I will add it.
Thanks DJ. So there's no way to do something similar with scripting that can be added to a mobile control button script in EZ Builder then, as I am currently using a VCN PC remote app?
Sure, a start and stop? do this...
Init the $pressed variable in your Connection or Init script, like so
$pressed = 0
In the button on your mobile form, have an IF condition that switches the variable back and forth between 0 and 1. Where 0 (zero) is false, and 1 (one) is true.
$pressed = 1
$pressed = 0
Brilliant. Exactly what I was looking for. Thanks very much for that DJ. This will help me out loads.