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

Sync or eject iPods/iPhones in iTunes via AppleScript Apps
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:
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.
    •    
  • Currently 2.40 / 5
  You rated: 3 / 5 (5 votes cast)
 
[14,867 views]  

Sync or eject iPods/iPhones in iTunes via AppleScript | 8 comments | Create New Account
Click here to return to the 'Sync or eject iPods/iPhones in iTunes via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Sync or eject iPods/iPhones in iTunes via AppleScript
Authored by: 01 on Apr 27, '08 02:01:58PM

Are you speaking of more that just the auto-sync option in iTunes?



[ Reply to This | # ]
Sync or eject iPods/iPhones in iTunes via AppleScript
Authored by: DougAdams on Apr 27, '08 02:41:05PM
Are you speaking of more that just the auto-sync option in iTunes?

If your iPod is set to sync automatically, the update command will sync it on-the-fly. For instance, if you add new stuff to iTunes and want it on the iPod right away, rather than hit the "sync" button on the iPod's Summary screen, run the script with the update command. If you have it set to manually manage, update has no effect.

---
Doug's AppleScripts for iTunes
dougscripts.com

[ Reply to This | # ]

Sync or eject iPods/iPhones in iTunes via AppleScript
Authored by: paulpro on Apr 27, '08 09:56:29PM
If you have it set to manually manage, update has no effect.

If you manually manage your music but sync other content, such as photos, bookmarks, contacts, and calendar items, will the update command trigger a sync of this data?

[ Reply to This | # ]
Sync or eject iPods/iPhones in iTunes via AppleScript
Authored by: DougAdams on Apr 28, '08 08:15:23AM

You either manually mange or you don't, depending on how "Manually manage music and videos" is checked in the iPod's Summary screen. If it is checked, update has no effect.

---
Doug's AppleScripts for iTunes
dougscripts.com



[ Reply to This | # ]
Sync or eject iPods/iPhones in iTunes via AppleScript
Authored by: paulpro on May 04, '08 05:23:42PM
You either manually mange or you don't, depending on how "Manually manage music and videos" is checked in the iPod's Summary screen. If it is checked, update has no effect.

Actually, it does.

Even if you have "Manually manage music and videos" checked, there are still other things that can need updating, and will be updated by the update command.

If you make a change to any of your:

- iPhoto albums
- calendars or calendar items
- address book contacts
- Safari bookmarks

then the update command will sync those changes.

And since those are the only things that I sync, this hint is perfect for my needs.

---
Why can't I colour label Address Book cards?


[ Reply to This | # ]

Sync or eject iPods/iPhones in iTunes via AppleScript
Authored by: mjb on Apr 28, '08 04:21:02PM
Dave writes:
If your iPod is set to sync automatically, the update command will sync it on-the-fly. For instance, if you add new stuff to iTunes and want it on the iPod right away, rather than hit the "sync" button on the iPod's Summary screen, run the script with the update command. If you have it set to manually manage, update has no effect.
Dave's right on the money with the bit I've italicised. I basically wanted the ability to force an instant sync, usually right before I want to walk away from the desk with my iPhone. I don't personally use 'manually manage', so this script suits me perfectly.

I also have 'automatically sync when connected' disabled, and using this script causes an instant 'on-the-fly' update, just like pressing 'Sync' on the summary screen - but without having to navigate to the summary screen to do so.

[ Reply to This | # ]

Sync or eject iPods/iPhones in iTunes via AppleScript
Authored by: ptujec on Jan 05, '09 06:47:59AM

Would be nice to have a growl notification for both



[ Reply to This | # ]
Sync or eject iPods/iPhones in iTunes via AppleScript
Authored by: MtnBiker on Oct 14, '09 02:54:57PM
iPhone is apparently an "unknown" device.
But with that change this script works for an iPhone in 10.6 and iTunes 9.0.1
if (kind of s is unknown) then eject s

---
Hermosa Beach, CA USA

[ Reply to This | # ]