Issue with ControlSend (Alt key gets sent to focused window)

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Scr1pter
Posts: 947
Joined: 06 Aug 2017, 08:21
Location: Germany

Issue with ControlSend (Alt key gets sent to focused window)

13 Jan 2019, 17:38

Hi guys,

I use a ControlSend to toggle pause/play in VLC player.
Pause/Play command in VLC player is Alt+Left.

I activate this command either by Ctrl+F12 or Mouse Button 9 (F18).
When I'm for example and Word and press one of the two activation hotkeys (while VLC is not running),
nothing happens - this is correct.
If VLC is running, it gets paused/continued (correct), but in Word all the control elements get highlighted.
(Same as if I'd pressed Alt inside of Word.)

When I activate the command by Ctrl+F12, everything is perfect - no control elements of Word get focused.
If I do it with F18 (MB09), the Word control elements always get focused.

That's the code:

Code: Select all

;VLC-Player Pause
F18:: ; MB09-M1 - Standardprofil -> Sends always additionally Alt to Word (or any other application) if VLC is running
^F12:: ; Strg+F12 -> Always fine
;ControlSend, QWidget7, !{Left}, ahk_class QWidget ; Alt+Pfeil nach links an VLC-Player senden -> Works
;ControlSend, , !{Left}, ahk_class QWidget ; Alt+Pfeil nach links an VLC-Player senden -> Works
ControlSend, ahk_parent, !{Left}, ahk_class QWidget ; Alt+Pfeil nach links an VLC-Player senden -> Works
return
It's the case for all three ControlSend command variations.

It's disturbing, because I cannot coninue writing in Word once I pause VLC, because I always have to press Alt first.
Any idea why it's the case?

Thanks for any help!

Regards
I ignore every thread which contains the P-word :x
(Hint: It rhymes on Shython)
Please do not support cheaters!
Keyboard: Logitech G15 FE - Mice: Logitech G9 FE, G502 FE, G602 - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.29.00

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, Google [Bot] and 155 guests