LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automatically open file with application

how can I get a file automatically being opened by a self-built application when clicked-on in the windows explorer ?
0 Kudos
Message 1 of 7
(3,315 Views)
If I understand your question correctly, you want to be able to double click a file in an explorer window, and open it with your own application rather than whatever windows normally uses?
If so, you can achieve this by modifying / adding a file type (used to be called associations). If you select the tools menu -> Folder options -> File Types, you are presented with a window listing the current registered file type by suffix. From here you can modify the application used by default to open specific file types. Another simpler way is to selectg the file that you wish to open, right click on it to bring up the context menu, then select open with. In the ensuing selection box, there is a tick box to 'always use this program with this file type'
If this isn't what y
ou were asking please excuse my ramblings and provide more details 😉

Regards
John
0 Kudos
Message 2 of 7
(3,315 Views)
Doing so, the correct application is started automatically, but it does not get information about the file path you clicked on, and thus does nothing else than run without file path information. The file you double-clicked on is not being read by the application.
How can the information of the file path be given to the self-built application?
Thanks !
0 Kudos
Message 3 of 7
(3,315 Views)
I found this article which may help you...

http://openg.org/tiki/tiki-index.php?page=File%20Handling%20Guidelines

Regards
John
0 Kudos
Message 4 of 7
(3,315 Views)
LabVIEW 7 added the property App.Args that will return any command line arguements to the VI. There is also a shipping example called CommandLine that demonstrates how to use it. For older versions, there is an example
0 Kudos
Message 5 of 7
(3,315 Views)
LabVIEW 7 added the property App.Args that will return any command line arguements to the VI. There is also a shipping example called CommandLine that demonstrates how to use it. For older versions, there is an example here that uses the Windows API to get the command line arguement.
0 Kudos
Message 6 of 7
(3,315 Views)
This was helpful.
Thanks !
0 Kudos
Message 7 of 7
(3,315 Views)