Re: newbie question on simple finder actions
Re: newbie question on simple finder actions
- Subject: Re: newbie question on simple finder actions
- From: Mr Tea <email@hidden>
- Date: Tue, 22 Apr 2003 13:16:50 +0100
This from John Delacour - dated 22/4/03 12:33 am:
>
I'll leave you to work out why.
Clearly, you have a Machiavellian streak, John. :O
Daniel, I hope you haven't already disappeared under a mountain of alias
files, but note that if you make an alias file in the folder that has the
'on adding' folder action attached, the folder action will see another item
added to the folder, and will make a another alias, and will make a another
alias, and will make a another alias, and will make a another alias...
You need the folder action to either (1) check that the added item is _not_
an alias before processing it, or (2) make and store the newly created
aliases in a separate folder, or (3) if you're in OS X, abandon folder
actions for the time being and use a stay-open script applet to watch the
folder instead.
For option (1), a revised script might look something like this:
--===========================================================
on adding folder items to this_folder after receiving these_items
tell application "Finder"
repeat with this_Item in these_items
if kind of this_Item is not "Alias" then
make new alias to this_Item at this_folder
move this_Item to folder "Macintosh
HD:Users:ecolabg4:Documents:journal articles:raw refs:"
end if
end repeat
end tell
end adding folder items to
--===========================================================
(Any lines that abut the left margin of the message window have been wrapped
and should be re-connected to the end of the previous line.)
HTH
Nick
pp Mr Tea
--
_______________________________________________
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.