LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait for Keyboard Stroke before continuing For Loop

Hello Everyone:

Was wondering if anyone knows how to make a For Loop wait until any key on the keyboard is pressed before running the next step in the loop.

I'm using LabVIEW 6.0...any suggestions or sample VI's appreciated!

Thanks
0 Kudos
Message 1 of 2
(2,361 Views)
Since you're using 6, you won't have events, but try using the GetKeyboardState function from user32.dll inside a while loop which is inside the for loop. If you're only monitoring a specific key, you can use GetKeyState, which is simpler. Documentation for both can be found in the MSDN. If you don't want that, search google for LV Toolbox. I believe it has this as a VI.

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