Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

adrian.jfl

macrumors newbie
Original poster
Aug 28, 2007
1
0
Hi,

I want to open a file (say a .txt) with it's default Finder program
association (eg textedit).. I have an application that doesn't support
applescript but will still launch if I double click on it's associated
files.. I'd like to be able to launch them from applescript.

Thanks,
Adrian.
 
Hi,

I want to open a file (say a .txt) with it's default Finder program
association (eg textedit).. I have an application that doesn't support
applescript but will still launch if I double click on it's associated
files.. I'd like to be able to launch them from applescript.

Thanks,
Adrian.

tell application "Finder" open file "Myfile.txt" of desktop

-or-

do shell script "open ~/desktop/myfile.txt"

-or-

tell application "myNonScriptableApp" to open posix file "/Users/me/desktop/myfile.txt"

All applications even non scriptable ones respond to open, activate, quit, and launch.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.