April 18, 201213 yr Newbies 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?
April 18, 201213 yr 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
April 19, 201213 yr 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.
Create an account or sign in to comment