|
|
Two suggestions:
First, to allow this script to be run via SSH from another machine:
(as I note in the MacNN forum where David also posted this)
Change the Applescripts slightly to use the Remote AppleEvent syntax:
tell application "iTunes" of machine "eppc://127.0.0.1" to play the current trackFor the above to work, you'll need: (1) To click the checkbox "Allow remote Apple Events" in the Sharing control panel (2) To be physically present at the machine to enter authorization name & password. If you save the authorization to your Keychain, you won't have to enter it again. This loops back the AppleEvents to the same machine that you are SSH'd into, which presumably is the same machine where iTunes is running. I imagine you could also change the IP address from the loopback 127.0.0.1 to the IP of whatever machine is running iTunes; this would let you run the scripts on a local Terminal, to control a remote iTunes. Second, to speed up the scripts: Applescript is compiling those scripts each time. It would be faster to precompile them, using the Script Editor or the osacompile tool, and save them to separate files. Then change the shell script to 'osascript /Library/Scripts/iTunes/play.scpt' or whatever location you settle on. It's still not exactly speedy, but it helps.
Two suggestions:
I've made the changes but the problem I seem to be running into is this error:
Two suggestions:
Okay, I have compiled the various small functions ('play', 'pause', etc) as AppleScripts, but am puzzled as how to manage the 'vol' one? Any suggestions as to how to handle this one? I'm new AppleScript and dunno how to pass params etc.
Run as ssh
You will probably not need the addition of the host inside the applescript. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|