• 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: Rename Droplet Works in OS 9 But Not X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rename Droplet Works in OS 9 But Not X


  • Subject: Re: Rename Droplet Works in OS 9 But Not X
  • From: John Delacour <email@hidden>
  • Date: Thu, 3 Jul 2003 21:10:46 +0100
  • Mac-eudora-version: 6.0a25

At 10:41 am -0700 3/7/03, Alatorre, Michael wrote:

Here is a simple rename droplet that works in OS 9:

on open theFile
tell application "Finder"
select theFile
set name of selection to "PEAC-SMG.xls"
end tell
end open

That's not the way to use the open handler, though it will work if you say

set name of (get item one of selection) to ....

When you drop items on a droplet you are handing the script a _list_ of aliases. The Finder's selection is a _list_ of 'document files'.

Do something like this:


on open _droppedItems -- (a list)
repeat with _item in _droppedItems -- each (alias in the list)
tell app "Finder" to get the _item's name
display dialog result
end
end

JD




.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Faster List Checking
  • Next by Date: URL Access Scripting
  • Previous by thread: Re: Rename Droplet Works in OS 9 But Not X
  • Next by thread: Re: why won't force-eject work in a script, but will from command line?
  • Index(es):
    • Date
    • Thread