Help with writing a script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
benim
Posts: 1
Joined: 04 Aug 2022, 12:54

Help with writing a script

Post by benim » 04 Aug 2022, 13:20

Hi guys,

This might be simple to a few of you, but I cannot get this to work…

So, what I would like is the following to happen (in a loop):
Press X
100ms after it should press and hold right arrow for 5s
then press X again

Then repeat this 4 times, before it should do the same but with left arrow instead.

Could anyone help me write this script?

racqu
Posts: 3
Joined: 04 Aug 2022, 12:58

Re: Help with writing a script

Post by racqu » 04 Aug 2022, 14:18

This should accomplish what your asking.

Code: Select all

Function() {

Loop, 4{
Send {x}
Sleep, 100
Send {right down}
Sleep, 5000
Send {right up}
Send {x}
}

Loop, 4{
Send {x}
Sleep, 100
Send {left down}
Sleep, 5000
Send {left up}
Send {x}
}
}

[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]

Post Reply

Return to “Ask for Help (v1)”