Jump to content
8 posts in this topic

Recommended Posts

Hello,

 

I just got a dock for my Nano and I want to keep it docked overnight and during work so I can pick up my latest podcasts to listen to during my commute.

 

I'd like to set it to auto-sync at a set interval, say, once an hour it automatically syncs.

 

Any ideas on how to do this?

 

Thanks

Link to comment
https://www.insanelymac.com/forum/topic/37468-periodic-auto-sync/
Share on other sites

Thanks for the reply and the welcome. I look forward to using this site more and more now that I've discovered it.

 

I actually do have the podcasts set to download every hour and auto-sync on already, but it only auto-syncs when I first connect. After that, I have to tell it to sync. Should it be syncing periodically?

I guess I'm the only one that is too lazy to hit "sync" by hand :whistle: , so I wrote my first AppleScript. It's pretty straightforward stuff ...

 

on idle
tell application "iTunes"
	update "ipodname" -- replace what's in quotes with the name of your iPod
end tell
beep 3 --You can leave this out of course. I just like that audio confirmation that the script triggered.
return 3600 --seconds between updates
end idle

 

I just started testing this today and it seems to be working well. One thing I'd like to add to it is a check to see if the iPod is mounted.

 

Any clues on how to do that?

Edited by ugaMack

Well I couldn't figure how to check to see if the iPod is mounted, but this new and improved script handles the errors, which is just as good, I guess.

 

global timeBetweenUpdates
on idle
try
	tell application "iTunes"
		update "Nano"
	end tell
	beep 3
on error
	beep 2
	return timeBetweenUpdates
end try
return timeBetweenUpdates
end idle

on run
set timeBetweenUpdates to 3600 --seconds
end run

 

I hope this helps anyone looking to do the same thing.

  • 3 years later...
×
×
  • Create New...