Hold Key down on window

Advanced Macro Recorder/Editor.

Moderator: Pulover

Posts: 1
Joined: 14 Mar 2020, 22:35

Hold Key down on window

Post by nadmaster101 » 19 Dec 2020, 00:30

This is the current script I have that should hold down the W key for 5 seconds and release it on the certain window with the title Tank set by the first line. It only taps the W key and doesn't hold it down. I can get it to work without Control but then it does it for whatever window is active at the time. Is this an issue with compatibility between Pulovers and the controlled program?

Code: Select all

WinSetTitle, ahk_pid 7392, , Tank
Sleep, 333
    ControlSend, , {w Down}, Tank
    Sleep, 5000
    ControlSend, , {w Up}, Tank

Return to “Pulovers Macro Creator”