Sign in to follow this  
Followers 0
supag

need help with an autoit command

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

well i tested it, it looped forever, but i think its just clicking it forever, instead of holding. not sure tho.

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0