• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem with folder action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: New AppleScript book
  • Next by Date: Re: Way to run AS on PPP connect/VPN connect?
  • Previous by thread: Running script on sleep/wake / VPN reconnect
  • Next by thread: Re: SmileLab 1.2.2.
  • Index(es):
    • Date
    • Thread