Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Change Safari 's 'Safe Open' list' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change Safari 's 'Safe Open' list
Authored by: jonbauman on Jan 26, '05 10:56:37AM

Why not just attach a folder action to your downloads folder, and write a script that only opens files of the appropriate type? For example:

property safe_extensions : {".doc", ".xls", ".torrent"}

on adding folder items to this_folder after receiving added_items
	tell application "Finder"
		repeat with afile in added_items
			repeat with extension in safe_extensions
				if the name of afile ends with extension then
					open afile
				end if
			end repeat
		end repeat
	end tell
end adding folder items to

---

jon

[ Reply to This | # ]

Change Safari 's 'Safe Open' list
Authored by: adrianm on Jan 26, '05 12:44:34PM

I just find it amusing you think .doc and .xls are 'safe' attachments.



[ Reply to This | # ]
Change Safari 's 'Safe Open' list
Authored by: jonbauman on Jan 27, '05 10:48:57AM

I guess it's all relative, considering that on Windows opening JPEGs might not be safe. However, I was under the impression that the macro virus problems had been handled, and I don't open Excel or Word documents from untrusted sources anyway.

---

jon

[ Reply to This | # ]

Change Safari 's 'Safe Open' list
Authored by: pascalpp on Jan 26, '05 05:16:01PM

Do you download to your Desktop folder?

I do, and I found that attaching a Folder Action to the desktop was very annoying, as any time i created a new folder and tried to rename it, the folder action would invoke and interrupt the naming process. Then i'd have to reselect the folder, hit return, right arrow, and finish naming. Very annoying.

Does this happen to you?



[ Reply to This | # ]
Change Safari 's 'Safe Open' list
Authored by: jonbauman on Jan 27, '05 11:04:20AM
Do you download to your Desktop folder?

No, I like to keep my desktop clean, so I have a separate downloads folder. If you prefer to have your downloads sitting on your desktop, set up a downloads folder, and have the script move new additions to the desktop and then open them. That way, it won't interfere with any modifications to files already on your desktop.

Try creating a new folder that you use only for downloads and attach this script to it:

property safe_extensions : {".doc", ".xls", ".torrent"}

on adding folder items to this_folder after receiving added_items
	tell application "Finder"
		repeat with afile in added_items
			move afile to desktop
			repeat with extension in safe_extensions
				if the name of afile ends with extension then
					open afile
				end if
			end repeat
		end repeat
	end tell
end adding folder items to

---

jon

[ Reply to This | # ]

Thanks! Change Safari 's 'Safe Open' list
Authored by: alexmathew on Jun 20, '08 11:41:16AM

I was just setting up a new Macbook Air for a colleague moving from Windows and this lack of "feature" about Safari was bugging him. Your Script will save my reputation - I had said that the Mac can do anything Windows does - for him anyway!
Thanks
AM

I would give 5 stars for THIS hint - there should be a way of rating replies too!



[ Reply to This | # ]