Sync or eject iPods/iPhones in iTunes via AppleScript
Fri, Apr 25 2008 at 7:30AM PDT • Contributed by: mjb
Fri, Apr 25 2008 at 7:30AM PDT • Contributed by: mjb
I find it frustrating that there's no quick and easy way to sync my iPod and iPhone in iTunes without a degree of mouse movement and clicking (someone please correct me if I'm wrong!). Since I'm a keyboard navigation fan, I wrote some very simple AppleScripts to either sync or eject all iPods/iPhones currently connected to iTunes. The scripts are identical apart from the type of action:
Sync iPod.scpt:
Sync iPod.scpt:
tell application "iTunes"
repeat with s in sources
if (kind of s is iPod) then update s
end repeat
end tell
Eject iPod.scpt:
tell application "iTunes"
repeat with s in sources
if (kind of s is iPod) then eject s
end repeat
end tell
I personally have these scripts in my user's Library/Scripts folder, and use Quicksilver to quickly invoke them when I want to force a sync or eject of my iPod/iPhone.
•
[6,135 views]
