LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

input key to open file

Hello,
 
I would like to know on how to do this:   A workspace for user to key input, for example "A" , and it will open an exe file. And if user key in "B", it will open another exe file. Thank you.
0 Kudos
Message 1 of 5
(2,958 Views)
On what point is your problem ? on opening an exe file or on the selection depending on the key input ?

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 5
(2,953 Views)

The selection part can be done using the Key Down event in the event structure. The calling can be done by using the System Exec VI from the communication palette. You can find documentation and examples by looking in Help>>Find Examples.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).

 

___________________
Try to take over the world!
Message 3 of 5
(2,947 Views)

Hello all,

Sorry for the unclear message. I know how to open an exe file but I do not know how to create an workspace where user can actually key in a character, for example "A" to open an exe file. It like keying an character which will be shown on the screen which then press a button to open it. Thank.

0 Kudos
Message 4 of 5
(2,941 Views)
In the event structure you can associate events with different objects. If you use the VI as the object for the key down event, the event will be fired whenever your front panel is in focus and you click a key. For something more specific you can create a control and register for clicks when it has focus.

___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(2,936 Views)