Re: Rename Droplet Works in OS 9 But Not X
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:48:21 +0100
- Mac-eudora-version: 6.0a25
At 2:41 pm -0400 3/7/03, Ben Waldie wrote:
There are a couple of ways to do this...
on open theFile
tell application "Finder"
select theFile
set theSelection to selection
set name of (item 1 of theSelection) to "PEAC-SMG.xls"
end tell
end open
OR
on open theFile
set theFile to item 1 of theFile
tell application "Finder"
select theFile
set name of theFile to "PEAC-SMG.xls"
end tell
end open
This is all sooooo unnecessary. If you want to rename a single file,
then all you have to write is this:
on open ls
tell app "Finder" to set the name of the first item in ls to "x"
end
What is the point of selecting something that's already selected?!
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.