Skip to content

Instantly share code, notes, and snippets.

@imabuddha
Created January 27, 2010 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imabuddha/287624 to your computer and use it in GitHub Desktop.
Save imabuddha/287624 to your computer and use it in GitHub Desktop.
on adding folder items to this_folder after receiving added_items
tell application "Safari"
repeat with w in windows
if name of w is "Downloads" then
set isdocument to true
try
set d to document of w
set the result to d
on error
set isdocument to false
end try
if (not isdocument) then
tell w to close
end if
end if
end repeat
end tell
end adding folder items to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment