Re: Applescript to trap when I insert my ipod?
Re: Applescript to trap when I insert my ipod?
- Subject: Re: Applescript to trap when I insert my ipod?
- From: Mr Tea <email@hidden>
- Date: Tue, 24 Oct 2006 21:47:43 +0100
This from Steven Halford - dated 24/10/06 8.23 pm:
> Previously, I have attached a folder action script to the hidden
> folder /Volumes/ that runs a script along the lines of
>
> tell application "Finder"
> if exists (disk "My_iPod_Name") then
> --do the iTunes stuff
> end if
> end tell
[snip]
> The problem with this method is that the script is run whenever a
> disk is mounted and the /Volumes folder is changed, which means that
> if a CD is mounted while your iPod is connected then your podcasts
> will be refreshed again even if the script has already done it once.
Use the folder action's ability to get information about the added item...
on adding folder items to this_folder after receiving added_items
tell application "Finder" to set theName to name of item 1 of added_items
if theName is "My_iPod_Name" then
--do the iTunes stuff
end if
end adding folder items to
Nick
pp Mr Tea
--
Brew of the day: Tippy Assam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden