Newbies FrankPottner Posted April 18, 2012 Newbies Posted April 18, 2012 I'm sure this is a very simple question; I just haven't found the answer. Once I have the path to a file, how do I use ScriptMaster to open the file with it's native app?
john renfrew Posted April 18, 2012 Posted April 18, 2012 Here's one way Would be interested to see how others might do it. Needs Java 1.6 - so won't run on OSX 10.5 or less // FileOpen ( fm_fileIn )) // 12_02_22 JR // v1.2 // open any file in registered desktop application import java.awt.Desktop if (java.awt.Desktop.isDesktopSupported()) { desktop = new Desktop() try { desktop.open(new File(fm_fileIn)) } catch (e) { return e.getMessage() } return true } else { return 'ERROR' } //end if
David Wikström Posted April 19, 2012 Posted April 19, 2012 John - I find your version to work just fine (at least on the Mac). In particular, it's nice that it also works to reveal a folder in Finder if you send a folder path and not a file path.
Recommended Posts
This topic is 4670 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now