• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applescript to trap when I insert my ipod?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Applescript to trap when I insert my ipod?
      • From: Robert Nicholson <email@hidden>
References: 
 >Re: Applescript to trap when I insert my ipod? (From: Steven Halford <email@hidden>)

  • Prev by Date: Re: "~" vs. "POSIX file"
  • Next by Date: Re: "~" vs. "POSIX file"
  • Previous by thread: Re: Applescript to trap when I insert my ipod?
  • Next by thread: Re: Applescript to trap when I insert my ipod?
  • Index(es):
    • Date
    • Thread