07-07-2017 08:45 AM
I have tried in vain to set my adobe pdf reader to READMODE but cant seem to get to the bottom of how it is done.
If however when I running my vi and I put focus onto the reader and press CTL H - this puts the reader into READMODE.
Does anyone know how I can replicate CTL H key press in code.
Many thanks.
Lee
07-07-2017 09:52 AM
All this requires utilising user32.dll, luckily other people have already turned this into VIs for us.
Try using code from this example:
It is fairly well explained, you will just need to make the window have focus. Here is an example for doing just that:
http://forums.ni.com/t5/Example-Programs/Programmatically-Move-Any-Window-to-the-Front/ta-p/3532516
07-08-2017 03:16 AM
Hello Ian
Thank you for your reply
I downloaded your code and ran and it works great.
So, in my application I need to 'iniitiate' CTL H. I put the focus on the adobe reader control and ran the keystrokes CTL DOWN 10mS - H PRESS 100mS - CTL UP 10mS, but unfortunately it didn't have the desired effect.
I can see when you put the output into a string indicator it works a treat.
Is there something I am missing here?
Lee
07-08-2017 03:26 AM
Hello again Ian (quick reply to myself here)
I just needed to add a small delay before I applied the CTLH and it works a treat
Thank you very much for your help on this, it has been 'bugging' me on and off for a few weeks
Lee