This posting is older than 6 months and can contain outdated information.
Hi,
I've read all I could about this subject but couldn't find out a working solution to my problem.
I wrote an AppleScript application which sends various commands to VLC and for which I'd like to have a custom behavior activated. I've written and installed my behavior and the script activates it and makes it sticky just after VLC has been launched (if I don't make it sticky then RB switches back to VLC) :
tell application "Remote Buddy" to behaviourcore accessor "setActiveBehaviour" identifier "com.me.scriptedbehaviours.myscriptapplication" useActivationEventCode "activated" with stickyValue
Everything's okay. Now the problem with this is that I have to manually deactivate the behavior once the script application has quit. I'd like RB to switch back to default behavior or whatever is running once the script has quit. I tried adding this to the quit handler of my app (as I understand it it should still detect my script running but clear the stickyValue) :
tell application "Remote Buddy" to behaviourcore accessor "triggerAutoRecognition"
also tried to activate default behavior :
tell application "Remote Buddy" to behaviourcore accessor "setActiveBehaviour" identifier "com.iospirit.remotebuddy.defaults" useActivationEventCode "activated"
Both result in my script and RB hanging until I force quit the script. I still didn't figure out a way to "unstick" the behavior or return back to default (would be nice to have an example for this in the dictionary).
Thanks
Last edited: 26.03.2015 22:12:08