10-03-2016 02:20 PM
When desperate and all the other methods have failed you can try the Application.SendKeys method.
Here in the following example I want to activate the Create PDF button of the Acrobat tab. If you press and hold the ALT key you will see letters and numbers appear:
So to activate the Acrobat tab I need to press ALT+B, here is the Acrobat tab:
As you can see letters and numbers are still active: So to activate Create PDF I need to press C.
So the desired key combination is: ALT + B C. Pressing the ALT key again will deactivate the letter/number display.
In code the key combination will be: "%BC%" where % represent the ALT key.
Here is the code in LabVIEW:
You can get more details on the SendKeys method here.
Ben64
10-05-2016 12:43 AM
Dear Ben,
thanks for the help, it looks feasable. Can you please send me the labview VI (you only attached an image and some of the functions you used I do not know and it is difficult to find them...)
10-05-2016 08:13 AM
@fabbro12 wrote:Dear Ben,
thanks for the help, it looks feasable. Can you please send me the labview VI (you only attached an image and some of the functions you used I do not know and it is difficult to find them...)
The image is a snippet, if you drag and drop it in a block diagram it will recreate the vi. Anyway, attached is the vi. You will have to determine the correct key combination to activate the Sekonic tab and the Measurement Start button.
Ben64
10-05-2016 08:22 AM
Thanks BEn,
even if I could not recover your VI (I use LV 2014 and you did on LV 2015), from the icons I was able to do it myself and it works now.
Even if it is not an optimized solution (I am obliged to keep the excel file active while running the LV VI), in this way I will be able to get the results I need in a short time!
Thanks