Timing of folder action scripts
Timing of folder action scripts
- Subject: Timing of folder action scripts
- From: email@hidden
- Date: Wed, 15 Mar 2006 16:49:55 -0500
Hello,
On a network server volume, I have six folders with folder action
scripts attached. Editors drop unprocessed images into the folders,
triggering Photoshop to process the image files for publication. This
system works quite well, but there are interesting glitches.
One of those glitches involves the timing of the scripts. Editors often
download files directly into the "hot" folders, so II've written an
80-second delay into each script. What I've noticed is that when images are
placed in multiple folders at about the same time, certain folders will
begin processing first, no matter in what order the images were placed.
So, let's say I have one folder, "B/W to be Toned," and a second folder,
"Color to be Toned." If I place 10 images into "Color," wait 10 seconds,
then put 10 images into "B/W," either a single image from Color will be
processed followed by all of the B/W, then followed by the rest in Color or
all of B/W will process followed by all of Color.
I've rigged a test in which five folders with scripts attached receive
five files simultaneously - or as simultaneously as Finder can move the
files. The same holds true as above. No matter how I order the test script,
certain folders pop up first, every time.
Does anyone understand the mechanism that determines which script is
triggered first?
Here's the Test script:
set fileOne to alias "Macintosh
HD:Users:trebilj:Desktop:TestStart:columnOne.png"
set fileTwo to alias "Macintosh
HD:Users:trebilj:Desktop:TestStart:columnTwo.png"
set fileThree to alias "Macintosh
HD:Users:trebilj:Desktop:TestStart:columnThree.png"
set fileFour to alias "Macintosh
HD:Users:trebilj:Desktop:TestStart:columnFour.png"
set fileFive to alias "Macintosh
HD:Users:trebilj:Desktop:TestStart:columnFive.png"
set folderOne to alias "Macintosh HD:Test world:One World:"
set folderTwo to alias "Macintosh HD:Test world:Two world:"
set folderThree to alias "Macintosh HD:Test world:Three world:"
set folderFour to alias "Macintosh HD:Test world:Four world:"
set folderFive to alias "Macintosh HD:Test world:Five world:"
tell application "Finder"
move fileThree to folderThree
move fileFour to folderFour
move fileTwo to folderTwo
move fileOne to folderOne
move fileFive to folderFive
end tell
and here's one of the folder action test scripts:
on adding folder items to this_folder after receiving added_items
delay 10
display dialog "World Two" giving up after 1
error number -128
end adding folder items to
In this test, folderFive always reacts first, followed by folderTwo,
then folderFour, then folderThree then folderOne. It doesn't matter
how i change the order of the move.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden