Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I would like to change Safari Safe List of type files which open immediately after download. Any ideas how?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

One way is to use Hazel. I tried using it and it worked smoothly. However, Hazel isn't free ($25).

The second solution is to use Automator which is part of Mac OS X.

However, using Automator didn't quite work. Some of the mp4 files did open, but for unknown reason some didn't.

Also I'm not sure if Automator has to open the files as soon as they are downloaded, or there is a time frame which it could take to open them. Maybe some one more experiences with Automator could elaborate on this.

Here is a how to create and use an AppleScript to open .lyx files:

Open AppleScript file named addSafariSafeList.scpt:

property auto_open_extension_list : {"lyx"}

on adding folder items to thisFolder after receiving addedItems
    tell application "Finder"
        repeat with addedItem in addedItems
            if name extension of addedItem is in auto_open_extension_list then
                my openFile(addedItem)
            end if
        end repeat
    end tell
end adding folder items to

on openFile(f)
tell application "Finder"
        open f

    end tell
end openFile

copy the file to ~/Library/Scripts/Folder Action Scripts

Note: I didn't have this folder, so I created both ~/Library/Scripts and ~/Library/Scripts/Folder Action Scripts

Now, go to ~/ in Finder, right click on Downloads folder, click Folder Action Setup. . .

List should appear and contain addSafariSafeList.scpt

Now you're good to go - whenever you'll download lyx file it should open automatically when ever you download it.

NOTE: If you want to open another file type, simply change property auto_open_extension_list : {"FileExtensionHere"}

NOTE II: If you want several types use: auto_open_extension_list : {"FileExtension1Here", "FileExtension2Here"}

Enjoy!

share|improve this answer
add comment

Or just stop Safari from opening ANY files automatically by Preferences > General last checkbox "Open "Safe" files after downloading"...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.