Hi Graham, You can't easily open a doc in an already opened application by double-clicking on the document, because it will launch another instance of the application. What you need it 'intra-application communication' for instance: when the app launches, it checks a temp txt file to see if an instance of itself is already opened, if it is, then it sends a message to the other app (via the same text file and/or some sort of polling mechanism) to open the newly requested file.
There's actually a RunRev user group setup to try and build an OpenSource implementation of the 'intra-application' protocol and libray...but there's not much done on it yet. So, the short answer is it's currently very difficult to do this in Windows. Here's a tip on "Creating a custom icon for Windows" http://www.altuit.com/webs/altuit2/RunRev/Tutorials.htm -Chipp > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Graham Samuel > Sent: Sunday, February 23, 2003 10:11 AM > To: Revolution user discussion > Subject: Double-clicking a document in Windows > > > I've read Ken Ray's excellent article on 'Setting Document > Associations in Windows', and I think I understand it as far as it > goes. Trouble is, the depth of my ignorance is so profound, I don't > know where to look for more information - I am totally ignorant of > command-lines (well, at least since the early 70s), shells, > registries, you name it... anyway, rant over, my current question is > this: > > if my user double-clicks on a document (a stack or maybe a text file) > which is associated with my Revo-developed app, I can use Ken's > technique to get the app to launch and hand my app script the path of > the doc to open; however, what if the app is already open? Can I get > an environment variable to tell me this, or must I keep a system of > flags within my app to distinguish between the first time the user > double-clicks (when I will have to go through a long initialisation > sequence for the app) and all the subsequent times (when I will just > have to act as if my user had chosen File/Open from a menu)? I recall > I have had to do this 'manually' on Macs (using Apple Events with > SuperCard). In more general terms, where can I find out more about > environment variables and also about creating and attaching icons > (icon families?) to the application and its associated documents? > Maybe I have just missed some massive part of the Revo documentation, > but I don't think so. > > While I'm at it, what is the Windows equivalent of the Apple Event > "aevtquit", where the OS tries to force the app to quit, and how do I > handle it? > > Deeply confused > > Graham > -- > ------------------------------------------------------------------- > Graham Samuel / The Living Fossil Co. / UK & France > _______________________________________________ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-revolution _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
