09-24-2014 12:43 PM
I'm using CVI_AppOpenProject to open up CVI prj on automated tester but if a CVI
dialog window pops up then the window sits there waiting for the operator action defeating the purpose of automation (ie if relative paths change) .
I tried launching a thread to monitor fordialog windows using CVI_AppGetCVIState and using
keybd_event, but I can't bring focus of the CVI window to the foreground. 9There are other apps running on the foreground)
I looked at CVI_AppFakeKeystrokes but dont know how to use it (how to declare and populate a SAFEARRAY). Any suggestions or
examples to solve this problem are much appreciated. Thank you.
09-25-2014 03:36 AM
Hello Janete!
You should be able to accomplish this scenario using the ActiveX functions: OpenProject, GetCVIState and FakeKeystrokes.
Note, that there is a caveat to using FakeKeystrokes, as this function will only be able to send keyboard input to CVI dialogs (e.g. message boxes, configuration dialogs, etc), but not Windows OS dialogs (e.g. file popup dialogs like 'Save File As').
I hope this helps!
Best regards!
- Johannes
09-06-2022 11:03 AM
Could FakeKeystrokes also send keys to open CVI menus?
09-07-2022 06:47 AM
Hi ElectroLund
Please use CVI_AppFakeKeystrokes for to send fake keystrokes to CVI, instructing it to open menus in the ADE: https://www.ni.com/docs/en-US/bundle/labwindows-cvi/page/cvi/usermanual/actxappfakekeystrokes.htm
Johannes