Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Using open (again...)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Using open (again...)
Authored by: krishna on Feb 20, '03 01:18:09AM

Yup -- I only discovered one more gotcha: when I type

open -a itunes

it starts itunes in classic. I have to type

open -a itunes.app

to have it run the macosx version of itunes (which it does just
fine). That, plus turning on the ssh server, and this tcsh
alias (should all be on one line):

a tell 'osascript -e ' "'" 'tell application ' '"''\!:1''"' "'" ' -e ' "'" '\!:2-$' "'" '
-e "end tell" &';

means I can type:

ssh -C krishna@mymac.address.com
<enter password>
% open -a itunes.app
% tell itunes play

(this track is not that great, so I skip it:)
% tell itunes next track

(I want to play this one again)
% tell itunes previous track

(phone call!)
% tell itunes pause

and voila! Full remote control of itunes ... and probably other apps.
osascript is definitely a must-mention for any unix conversions.



[ Reply to This | # ]