Problem with folder action
Problem with folder action
- Subject: Problem with folder action
- From: Wesley Hall <email@hidden>
- Date: Fri, 12 Dec 2003 22:59:18 -0800
The following AppleScript will work the first time, but refuse to
work afterwards:
If I remove the inner 'tell application "SwapTop"' / end tell's it
will work. But then it makes SwapTop the frontmost application when
I want to stay in Safari.
BTW: The AppleScript is assigned as a folder action on my Safari
downloads folder.
-- Open Webshots files downloaded from www.webshots.com
-- by Wesley R. Hall
on adding folder items to this_folder after receiving added_items
tell application "Finder"
repeat with aFile in added_items
if the name of aFile contains ".wbz" then
set delay_time to 5
say "New web shots file detected."
delay delay_time
say "Opening web shots file."
tell application "SwapTop"
open aFile
end tell
end if
if the name of aFile contains ".wbp" then
set delay_time to 120
say "New web shots archive detected."
delay 1
say "Waiting for download."
delay delay_time
say "Opening web shots archive."
tell application "SwapTop"
open aFile
end tell
end if
end repeat
end tell
end adding folder items to
_______________________________________________
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.