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

13.04.2009 21:26:10
HOWTO: add a simple command to my remote buddy menu
View

This posting is older than 6 months and can contain outdated information.
I'd like to add a command onto my remote buddy menu called something like

"Wake media server"

which essentially will use this perl script

http://gsd.di.uminho.pt/jpo/software/wakeonlan/

with my media server's MAC address as parameter to send the magic packet that will wake the server. A command of the form like this

wakeonlan 03:5e:df:5c:34:29

I've never added a behaviour before but the more i read into it the more i don't actually think this is what i want to do. Isn't a behaviour typically mapped to a long running program like say quicktime, and then it has extra actions possible whilst its running. I only want to call a script in a one off fashion.

If anyone could point out what it actually is that i'm trying to do if its not a behaviour and perhaps have some tips on how to do it. Is it an action perhaps? I can't see a way to execute a script or program that's not an apple script.

Cheers

Jim 

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

Behaviours
Configuration
Hardware - Apple® Remote
User

14.04.2009 14:40:16
Re: HOWTO: add a simple command to my remote buddy menu
View

This posting is older than 6 months and can contain outdated information.
Thanks for asking.

You can launch command line tools (including the perl interpreter or 
any other command) via AppleScript using "do shell script". Apple has 
a good technote on its use and capabilities here:

http://developer.apple.com/technotes/tn2002/tn2065.html

Regarding the best implementation: Behaviours are not just for 
controlling applications. Instead they were named that way because the 
remote will have a different behaviour depending on which Behaviour is 
currently active. Examples for Behaviours that are not responsible for 
a specific application include the Audio & CD/DVD, Virtual Keyboard, 
Virtual Mouse, Virtual Remote, ... etc. Behaviours.

Behaviours act as the parent of a number of Actions (which themselves 
consist of Actors, which can be keyboard or mouse wheel events, 
AppleScripts, etc.). Or, as their "container".

What you'd likely want to do is create an action that uses AppleScript 
to execute the shell command of your choice. And then have that action 
to be globally available (by checking the respective checkbox), so it 
can be used as a menu item as well as being mappable to the button of 
a remote.

You can either just mark an action global in the Behaviour 
Construction Kit (it'll then turn up in the "Miscellaneous"-group in 
the Mapping and Menu prefs). Or you can also create a Behaviour to 
contain that action.

You'll find more info and step-by-step instructions in the Remote 
Buddy Help (under "How do I ..") as well as in the video found in the 
"For Developers" subpage of the RB site.

Best regards, 
Felix Schwarz