Applescript to Sync iOS Devices in iTunes
Tags:
Found a great applescript the other day, and thought I might as well start posting my favorites / most useful scripts that I come across. I found this one [here] at Macworld. Super simple little script, just triggers a sync on any iOS devices you have connected to iTunes. So far it seems to work great, even over WiFi, and simultaneously triggers both my iPhone and iPad to sync.
I stick all these scripts into a specific folder (which I keep in my Dropbox to sync across devices and keep a version history), and I use QuickSilver to call them. With this one, for example, I can just call QuickSilver and type "Sync iOS" (which is what I named the script) and push enter. Significantly easier than
- running iTunes
- switching windows from whatever I’m doing
- clicking on my phone
- clicking “sync”
- clicking on my iPad
- clicking “sync”
- returning to whatever window I was working in
As an additional benefit, I can schedule this script to run at a given time, when triggered by another program, or however I want with tools like Cronnix, Hazel, etc. Anyways, here's the script:
tell application “iTunes”
repeat with s in sources
if (kind of s is iPod) then update s
end repeat
end tell
Oh, one last thing. If you copy this script into ~/library/itunes/scripts (this folder might not exist, I had to create it), it will conveniently show up in your iTunes menu (see below). Because this folder won’t be indexed in QuickSilver, you can either just put an extra copy there and keep the other somewhere that QuickSilver searches, or add that folder in your QuickSilver catalog.