I'm needing to control a presentation ( acrobat or power-point) in the background.
My code works to the extent it will get its keystrokes to NOTEPAD while its in the background,
but NOT acrobat or powerpoint.
If acrobat is foreground, the code works - acrobat gets its key strokes, notepad (in the background gets it keystrokes)
( im just using notepad as a way to check the code it live and reaching somethings in the background)
The following code is what I'm using at present. WOULD greatly appreciate any tips on whats going on.
Its a win7 laptop.
thanks
********************************
#InstallKeybdHook
#UseHook
^g::
controlsend, ,{PgDn},ahk_exe AcroRd32.exe
controlsend, ,A string triggered by pressing g ,ahk_exe Notepad.exe
return
^h::
controlsend, ,{PgUp},ahk_exe AcroRd32.exe
controlsend, ,A string triggered by pressing h,ahk_exe Notepad.exe
return
*************************************
Sending keystrokes to background windows - inconsistent results.
-
- Posts: 36
- Joined: 21 May 2016, 03:32
Re: Sending keystrokes to background windows - inconsistent results.
Have you tried sending keystrokes to process ID?
Winget, ID, ID, A
ControlSend,,{PgDn},AHK_ID %ID%
It works flawlessly for me when handling Kitty.exe in background on Win7 OS.
Winget, ID, ID, A
ControlSend,,{PgDn},AHK_ID %ID%
It works flawlessly for me when handling Kitty.exe in background on Win7 OS.
Re: Sending keystrokes to background windows - inconsistent results.
Thanks for the tip, I have tried process ID, as reported by windows spy,
and same result..
I will try and capture the ID as per your example,
thanks..
and same result..
I will try and capture the ID as per your example,
thanks..
Re: Sending keystrokes to background windows - inconsistent results.
ControlSend,paneClassDC1,{F5},ahk_exe POWERPNT.EXE
Re: Sending keystrokes to background windows - inconsistent results.
This works for me to send PgUp to Adobe Reader, whether it is the active window or not.
Code: Select all
q::
ControlSend, AVL_AVView20, {PgUp}, ahk_class AcrobatSDIWindow
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: Rohwedder and 171 guests