LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe PDF Viewer CTL H

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

0 Kudos
Message 1 of 4
(2,660 Views)

All this requires utilising user32.dll, luckily other people have already turned this into VIs for us.

Try using code from this example:

http://forums.ni.com/t5/Example-Programs/Programmatically-Simulate-Key-Strokes-in-LabVIEW/ta-p/35217...

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

Ian
LabVIEW since 2012
0 Kudos
Message 2 of 4
(2,632 Views)

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

0 Kudos
Message 3 of 4
(2,599 Views)

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

0 Kudos
Message 4 of 4
(2,597 Views)