Jump to content

Recommended Posts

Posted

im making a bot and i need to press and hold the leftarrow for a certain amount of time, but i only know how to make it press the leftarrow for a certain amount of strokes. Does any one know how to make the bot press and hold leftarrow key for a certain amount of seconds?

Posted

I don't have AutoIt on the computer so some of the syntax will not be perfect:

SetEnv, a, 0
SetEnv, b, 3000
Gosub, LeftArrow
Exit

LeftArrow:
Loop:

Send, {LEFT}
EnvAdd, a, 1
IfNotEqual, a, b, Goto, Loop
Return

I *think* that will press the left arrow for three seconds.

A little reading goes a long way. Post count means nothing.

×
×
  • Create New...