help with script Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
rthompson
Posts: 3
Joined: 10 Jun 2019, 23:47

help with script

10 Jun 2019, 23:50

Hi. im totally new to autohotkey, and i have no idea how to get my first script running
The script i want is

When Capslock is on
{
hold down W for 3 seconds and then W key goes up
hold down S for 3 seconds and then S key goes up
check if capslocks is still on-> if yes loop back to hold down W for 3seconds
if capslock is off break loop
}


can please someone help me with this script
User avatar
YoucefHam
Posts: 344
Joined: 24 Aug 2015, 12:56
Facebook: https://fb.me/YoucefHamDz
Google: [email protected]
GitHub: YoucefHam
Location: Algeria
Contact:

Re: help with script  Topic is solved

11 Jun 2019, 00:13

Code: Select all

*~CapsLock::
while GetKeyState("CapsLock","T")
{
	SendInput, {w down}
	Sleep, 3000
	SendInput, {w up}
	Sleep, 62
	SendInput, {s down}
	Sleep, 3000
	SendInput, {s up}
}
return
:wave: There is always more than one way to solve a problem. ;)
rthompson
Posts: 3
Joined: 10 Jun 2019, 23:47

Re: help with script

11 Jun 2019, 00:43

YoucefHam wrote:
11 Jun 2019, 00:13

Code: Select all

*~CapsLock::
while GetKeyState("CapsLock","T")
{
	SendInput, {w down}
	Sleep, 3000
	SendInput, {w up}
	Sleep, 62
	SendInput, {s down}
	Sleep, 3000
	SendInput, {s up}
}
return
Thank you sir! have a nice day

Return to “Ask For Help”

Who is online

Users browsing this forum: Bluebon, effel, Google [Bot], Haan, mikeyww, w0z and 46 guests