I need a script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
flargulon

I need a script

29 Jul 2017, 14:31

i want it to hold w and press v every 3 seconds and press and hold the shift key every 10 seconds is that possible? if you can do this it would be deeply appreciated
Vh_
Posts: 203
Joined: 17 Mar 2017, 22:06

Re: I need a script

29 Jul 2017, 16:06

If I understand correctly.. this:

HotkeyName::

Code: Select all

Send, {W Down}
sleep, 3000
Send, V
sleep, 7000
Send, {ShiftDown}
Just bind it to the key you desire.
kamil4402
Posts: 7
Joined: 29 Jul 2017, 01:15

Re: I need a script

29 Jul 2017, 16:31

If I understand correctly.. this:

Code: Select all

delay1:=3000
delay2:=10000


F1::
	if(!isRuning){
		isRuning := true
		GoSub, HoldShift
		GoSub, HoldWpressV
		SetTimer, HoldWpressV, %delay1%
		SetTimer, HoldShift, %delay2%
	}else{
		isRuning := false
		SetTimer, HoldWpressV, Off
		SetTimer, HoldShift, Off
		SendInput {w up}
		SendInput {Shift up}
		isW	:= false
		isShift	:=false
	}
return

+F1::
	if(!isRuning){
		isRuning := true
		GoSub, HoldShift
		GoSub, HoldWpressV
		SetTimer, HoldWpressV, %delay1%
		SetTimer, HoldShift, %delay2%
	}else{
		isRuning := false
		SetTimer, HoldWpressV, Off
		SetTimer, HoldShift, Off
		isW	:= false
		isShift	:=false
		Sleep, 100
		SendInput {w up}
		SendInput {Shift up}
	}
return

HoldWpressV:
	if(isW) 
		SendInput {w up}
	SendInput {w down}
	isW := true
	Send, v
return

HoldShift:
	if(isShift) 
		SendInput {Shift up}
	SendInput {Shift down}
	isShift := true
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], ntepa and 239 guests