Sharon_ Posted March 16, 2011 Report Share Posted March 16, 2011 Hi all, How to write Labview code to automatically click 'Ok' button (or Press Enter button) assuming that tab control is on OK? For instance I have a Popup menu something like this: I just want to press the 'Enter' key here... -Sharon... Quote Link to comment
jgcode Posted March 16, 2011 Report Share Posted March 16, 2011 I am not sure 100% what you are trying to do (why show the dialog if a button is to be programmatically pressed regardless?). Having said that you could try checking the Key Focus property of the Ok Button on your dialog and if True then fire an event \ do something that is the same as a User pressing the Ok button. Quote Link to comment
Cat Posted March 16, 2011 Report Share Posted March 16, 2011 What jgcode said -- unless the popup is being generated by something other than LabVIEW (or other code you have control over)? Quote Link to comment
jgcode Posted March 16, 2011 Report Share Posted March 16, 2011 What jgcode said -- unless the popup is being generated by something other than LabVIEW (or other code you have control over)? You may be onto something there, on second look the popup does say Message From webpage - of course I have no idea, as its unclear at this stage I just assumed LabVIEW code. Quote Link to comment
ShaunR Posted March 16, 2011 Report Share Posted March 16, 2011 If it's your dialogue. Why not just bypass it completely or put a switch in to disable dialogues (maybe log it to a file instead). If it's not your dialogue (i.e in another application) then there are some suggestions here. Quote Link to comment
Sharon_ Posted March 17, 2011 Author Report Share Posted March 17, 2011 Hi all, Those pop up menus are not generated from my labview application. I am loading a webpage into Labview for testing some buttons. I can call the button's call back function using labview+Javascript method. Since the test is to be carried out fully automatically I need to press Ok to go ahead. I can change my webpage parameters and do everything what I want but I dont know how to click this 'Ok' because the function is something like this: if(!confirm( "Are you sure")) return; And I dont know how to bypass it. Thanks, Sharon Quote Link to comment
Sharon_ Posted March 17, 2011 Author Report Share Posted March 17, 2011 If it's your dialogue. Why not just bypass it completely or put a switch in to disable dialogues (maybe log it to a file instead). If it's not your dialogue (i.e in another application) then there are some suggestions here. Hi Shaun, Thank you for the link. I am finishing my project..!!! Regards, Sharon If it's your dialogue. Why not just bypass it completely or put a switch in to disable dialogues (maybe log it to a file instead). If it's not your dialogue (i.e in another application) then there are some suggestions here. Hi Shaun, Thank you for the link. I am finishing my project..!!! Regards, Sharon 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.