• 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: Dumb Finder scripting question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dumb Finder scripting question


  • Subject: Re: Dumb Finder scripting question
  • From: "Laine Lee" <email@hidden>
  • Date: Fri, 14 Dec 2007 14:34:52 -0500

On 12/14/07 1:17 PM, "Laine Lee" <email@hidden> wrote:

> Or is that precisely what you're trying to avoid?
Too vague a question perhaps. OK, then drag a few *.avi files onto a droplet created from the following script. If no corresponding *.mov file exists for any dropped file, an alert should appear.

on open the_items
    my check_related(the_items)
end open
on check_related(the_items)
repeat with the_item in the_items
set the_item to the_item as alias
try
tell application "Finder"
set sost to ((container of the_item) as alias) as Unicode text
end tell
on error t1
display dialog t1 and "
Fooey!"
end try
set thesourcename to (name of (info for the_item))
set thesourcename to (text items 1 thru -5 of thesourcename) as Unicode text
tell application "Finder"
set basename to thesourcename
repeat
try
set name_target to alias (sost & thesourcename & ".mov")
exit repeat
on error friendly_error
if friendly_error contains thesourcename then
tell me to display dialog "There's no such item as" & space & "\"" & thesourcename & ".mov" & "\" in the folder of the dropped files."
exit repeat
else
exit repeat
end if
end try
end repeat
end tell
end repeat
end check_related


Laine Lee
 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Dumb Finder scripting question
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: Excel 2004
  • Next by Date: Re: Excel 2004
  • Previous by thread: Re: Dumb Finder scripting question
  • Next by thread: Re: Dumb Finder scripting question
  • Index(es):
    • Date
    • Thread