Syntax_Error
Syntax_Error

Reputation: 1

How would I hold down a click keystroke in AutoHotKey?

I am having a problem when using my AHK script.

I want to hold down the left click for 13 seconds.

Click down
Sleep, 13000
Click up

It works on Google Chrome when I am clicking on text and I drag my mouse it highlights (meaning of course it is clicking down).

When I go on my game it wont click anything.

Am I doing it wrong or is it a problem with AutoHotKey?

Upvotes: 0

Views: 310

Answers (2)

Timothy
Timothy

Reputation: 111

Furthermore, I often find that running my scripts as administrator helps solve most of my problems when scripting for games, especially if the game itself is ran on administrator levels.

Upvotes: 0

woxxom
woxxom

Reputation: 73526

See SendPlay docs:

SendPlay's biggest advantage is its ability to "play back" keystrokes and mouse clicks in a broader variety of games than the other modes.

SendPlay {LButton down}
sleep 13000
SendPlay {LButton up}

Upvotes: 1

Related Questions