The Applescript Open File Code

The applescript open file codes mentioned below can help you to perform functions to open files and folders in Mac OS X

To open a FOLDER by using the ‘Finder’ option.

tell application “Finder”

set theFolder to make new folder at desktop with properties {name:”My Folder”}

open theFolder

end tell

To open a FILE with the help of ‘Finder’ option:

               set theFile to choose file
               tell application "Finder"
                               open theFile
               end tell

What if you want to open a file with a specific kind of application? This is done by adding parameters to the code as following:

        set theApplication to choose application as alias
               set theFile to choose file
               tell application "Finder"
                               open theFile using theApplication
               end tell

:

 

 

 

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)
Related Posts Plugin for WordPress, Blogger...

Leave a Reply