This posting is older than 6 months and can contain outdated information.
Thanks for asking.
What probably happens is this:
1) Your Behaviour is activated.
2) Your manual activation script is run, launching Safari
3) Safari becomes the active application
4) Remote Buddy automatically switches to the Safari Behaviour, which triggers the execution of your deactivation script
To selectively deactivate Remote Buddy's automatic switching to the Behaviour for the respectively active application, include this in your activation AppleScript prior to sending anything to Safari or any other application:
tell application "Remote Buddy" to behaviourcore accessor "setSticky" with stickyValue
This way, your Behaviour will remain active until you manually switch away to another Behaviour. At which point Remote Buddy also returns to automatic switching of Behaviours.
Best regards,
Felix Schwarz