Re: Opening the newest file in a folder
Re: Opening the newest file in a folder
- Subject: Re: Opening the newest file in a folder
- From: has <email@hidden>
- Date: Sat, 15 Dec 2007 00:05:03 +0000
On 14 Dec 2007, at 22:31, Craig Cope wrote:
I think you're right about folder actions. I have folder actions
set to run my script, but the script won't open the file because I
don't know how to tell it to get the file that was just dropped into
the folder. I'm new with AppleScript and I don't think I'm yet,
thinking like the guys who created it.
From the StandardAdditions osax, where the folder action event syntax
is defined:
adding folder items to -- Called after new items have been added to a
folder
alias -- Folder receiving the new items
after receiving list of alias -- a list of the items the folder
received
As you can see, the 'adding folder items to' event supplies a list of
alias values for the added items. Example:
on adding folder items to theFolder after receiving theItems
tell application "TextEdit" to open theItems
end adding folder items to
HTH
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
_______________________________________________
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