ControlSend doesn't work with Qbittorrent

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
KilliK
Posts: 255
Joined: 10 Mar 2016, 21:19

ControlSend doesn't work with Qbittorrent

Post by KilliK » 17 Jun 2022, 10:18

Hello

I am trying to use the ControlSend command to pause/unpause the torrents from a script, when the Qbittorrent window is minimized.
The hotkeys are Ctrl+Shift+P for pause and Ctrl+Shift+S for unpause

Unfortunately the command doesnt work at all, even if the QBT window is active:

Code: Select all

ControlSend,, {Ctrl down}{Shift down}p{Ctrl up}{Shift up}, qBittorrent ahk_class Qt5152QWindowIcon ahk_exe qbittorrent.exe
the Send command works if the window is active, so the keypresses are sent properly:

Code: Select all

Send {Ctrl down}{Shift down}p{Ctrl up}{Shift up}
Window Spy doesn't show any controls in the QBT window, and Errorlevel is 0.

What is the problem and how can I fix it?
if I cant use the ControlSend command, is there any other way to pause the torrents? I tried suspending the process, but it is not reliable, because sometimes i cant resume the process and I am forced to kill it.
I will ask in the QBT reddit too, but for now i am trying to fix this with ahk.

Return to “Ask for Help (v1)”