MartinMcD Posted February 20, 2011 Report Share Posted February 20, 2011 Hello there, I've registered my application to open tdms files. The first bit works perfectly - double click on a tdms file and my application is opened. I'm now trying to get the app to open the actual file that was clicked on but I can't get the path passed in: - In the Advanced section of the build options I have ticked the select box to 'Pass all command line arguments to the application' - In the open command section of the regedit I've included the %1 as below. In fact, I've tried other combinations of speech marks [INSTALLDIR]myApp.exe "%1" - I've enabled EnableSuperSecretStuff in my ini file so that the 'OS Open Document' is now an option in the event structure and I'm capturing this event. When I run the app, as I say the app opens fine but this event does not trigger. Does anyone know if there is one last step I am missing please? Thank you, Martin Quote Link to comment
jgcode Posted February 20, 2011 Report Share Posted February 20, 2011 [INSTALLDIR]myApp.exe "%1" Hi Martin LabVIEW help says to use two hyphens - have you tried that?? Cheers -JG Quote Link to comment
MartinMcD Posted February 20, 2011 Author Report Share Posted February 20, 2011 Hiya, I've got it half working my checking the App.Args property node on application start up. If I set it up like this then the file is correctly opened when the application starts. This is not using the OS open Document event though. If I try and open a second file with the application open then the OS Open Document event still doesn't get called. It seems like the arguements are getting passed over correctly but that the OS Open Document event is never called. Hmm, I'll keep looking. I did try the double-hyphen but it doesn't seem to make a difference (to the triggering of the event). Thanks, Martin Quote Link to comment
jgcode Posted February 20, 2011 Report Share Posted February 20, 2011 Hi Martin Please post what you find - this is something I haven't played with but sounds really interesting! Cheers -JG Quote Link to comment
MartinMcD Posted February 20, 2011 Author Report Share Posted February 20, 2011 Great, it's working. I didn't have/any experience or DDE which turns out to be what I needed to know. Chris Davies gives the answer in his post (26) here: http://lavag.org/topic/4851-associating-my-exe-with-a-specific-file-extension-type/page__st__20 To open a file once the app is open, the Dynamic Data Exchange is used which requires a few more keys to be added to the registry (he lists it). The end result is that the OS Open Document is called and everything works swimmingly Thanks, Martin 1 Quote Link to comment
jgcode Posted February 20, 2011 Report Share Posted February 20, 2011 The end result is that the OS Open Document is called and everything works swimmingly Good job! Quote Link to comment
Ton Plomp Posted February 23, 2011 Report Share Posted February 23, 2011 To open a file once the app is open, the Dynamic Data Exchange is used which requires a few more keys to be added to the registry (he lists it). The end result is that the OS Open Document is called and everything works swimmingly Martin, could you revise the documentation in the LabVIEW wiki on this topic? Another note, I've posted an idea on the LabVIEW idea exchange on opening up 'OS open document' to mere mortal. Please vote! Ton Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.