Support
All support resources for our products. Here you can find answers to frequently asked questions, discuss with other users, recover a lost license code or file a support request.
Forum closed
This forum was closed and turned into an archive effective April 21, 2018. It is no longer possible to create new topics or reply to existing topics.

Thanks everyone for all the great questions and contributions over the years.

Please use the Contact form to get in touch.

Remote Buddy Forum

Overview 

AuthorThread
User

26.03.2015 21:50:31
[Resolved] AppleScript deactivate sticky behavior

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 

These entries from the FAQ may be relevant to this topic:

Configuration
Hardware - Apple® Remote
Thread-display::