I am trying to put together a standalone app that will be able to save 2 (or more) different types of documents - neither of which will be in native rev stack format.
I have different scripts setup to open each type of document, and they work fine when the application is launched, and the user selects the document via an 'Open' dialogue box. However, what am I supposed to do if the user double-clicks one of the documents in their file system?
I have read the (really great) documentation provided, and have managed to successfully map file extensions/registry keys, etc., of the appropriate document types to my application. Double-clicking a document of the appropriate type DOES launch my application. And nothing else. Now, my application needs to somehow find out the name/path of the clicked document, so that it can run its appropriate document-opening script.
When the user double-clicks the document in the file system, the system launches the application, and - I'm certain - at the system level, passes the name/path of the clicked document to the application being opened. I cannot, however, find anywhere in the Revolution documentation a way to get that, so that I can automatically invoke the appropriate 'open' command.
I would have expected that some of the Revolution messages sent to the main stack would provide an easy mechanism to access the path of the document that was clicked - ie., as a parameter argument to the 'startup' message, the 'resumeStack' message, or even perhaps a specially-designed message (something like 'openFile pFileList'). This, however, does not seem to be the case.
After searching the documentation and the forum, all I could find was this old thread:
http://forums.runrev.com/phpBB2/viewtopic.php?t=559
This, of course, seem very much to be a patch-up solution - and which would only work on the Macintosh, as it depends on calls to AppleScript.
Please help!!!
I am truly hoping that someone is going to say, that I have missed something obvious!...
![Confused :?](./images/smilies/icon_confused.gif)