Re: Folder action -- attaching script to a folder
Re: Folder action -- attaching script to a folder
- Subject: Re: Folder action -- attaching script to a folder
- From: Michelle Steiner <email@hidden>
- Date: Fri, 1 Jun 2001 08:42:39 -0700
On 6/1/01 7:22 AM, Michael Turner <email@hidden> wrote:
>
Dumb question, but OS 9 is new to me... How do you attach a script to a
>
folder? I want a folder action to move each screen capture as I make them,
>
and I plan to make a bunch.
Use the contextual menu to attach the script.
Here's the script:
on adding folder items to thisFolder after receiving theseItems
tell application "Finder"
repeat with ThisItem in theseItems
if (file type of ThisItem is "PICT") and (creator type of ThisItem is
"ttxt") then
move ThisItem to folder "target" of the startup disk
end if
end repeat
end tell
end adding folder items to
Two caveats:
1. The disk window must be open for the script to work.
2. Any PICT file with a creator of "ttxt" moved or copied to, or created
in, the root of the startup disk will be moved to the target folder.
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------