LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Button to open application

Hi all,
 
I would like to know how can i create a button to open a specific file. Thank you all.
 
Rgds,
Tay
 
0 Kudos
Message 1 of 6
(3,384 Views)
Use an event structure like the attached VI.
0 Kudos
Message 2 of 6
(3,376 Views)
Hi Smercurio,
 
Thanks for your reply. But I am still very unsure on how to insert the path to open the file/application. For eg, if i want to open "C:\A.bmp", where should i include this?
 
Thank you again.
 
Regards,
Tay
 
 
0 Kudos
Message 3 of 6
(3,354 Views)


@Lip Seng wrote:
But I am still very unsure on how to insert the path to open the file/application. For eg, if i want to open "C:\A.bmp", where should i include this?

Well, "open" can mean many things, especially if you say "open the file/application". 😉
  • To read a text file, use read characters from file and display it in a text indicator.
  • To open a bmp file, just do something like in the attached VI and display it in a picture indicator.
  • To run an application, you need to use the "System exec" from the communication palette.
  • To open some other files, you may need to compose a commandline calling an external application with the desired fileanme (again using system exec).
What exactly do you want to do? Could you give more details? Thanks!

Message Edited by altenbach on 02-04-2006 11:31 PM

Message 4 of 6
(3,351 Views)
Hi altenbach
 
Thanks for your example and apologies for my unclear enquiry. What I really mean is that creating a button that will open a flash file (".swf"). The file attached contains 2 files (exe file and swf file) and it will give you an idea on what I really mean.
Pls note that the exe file is written in Visual C and pls paste both files in C:\
 
 
I have a qn on your example, can i open flash file instead of the bmp file in it? 
 
Thank you.
 
Rgds,
Lip Seng
0 Kudos
Message 5 of 6
(3,337 Views)
Well, it is exactly as I said in my last point above. :)
 
You need to compose the correct full command line before feeding it to system exec. I cannot run your application, because some missing libraries, so you have to test and tweak for yourself (some notes are on the diagram). Of course if you always call the exactly same command line, you can write the entire commandline as a single diagram string constant and eliminate the path controls on the FP.
 
Depending on your needs, you also have to adjust other inputs to system exec. Check the online help for details on this function. Good luck!
 
 
Message 6 of 6
(3,327 Views)