Switching my script from a hold down spam to a Toggler
#ifWinActive World of Warcraft ; Only run if window 'World of Warcraft' is active
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
{
; The following script is run when the user presses the '1' key
; and will loop until the 1 key is no longer pressed, sending
; 1 over and over every delay miliseconds. To use a different
; key, replace all three 1s with the key you want repeated.
delay:=95
$1::
Loop
{
if not GetKeyState("1", "P")
break
Send 1
Sleep delay
}
return
please and thank you
Please Help... <3 Topic is solved
-
- Posts: 2
- Joined: 14 Nov 2017, 20:20
Re: Please Help... <3
Try:
Code: Select all
#ifWinActive World of Warcraft ; Only run if window 'World of Warcraft' is active
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
; The following script is run when the user presses the '1' key
; and will loop until the 1 key is no longer pressed, sending
; 1 over and over every delay miliseconds. To use a different
; key, replace all three 1s with the key you want repeated.
delay:=95
$1::
KeyWait, 1
Loop
{
if GetKeyState("1", "p")
break
Send 1
Sleep % delay / 2
if GetKeyState("1", "p")
break
Sleep % delay / 2
}
return
Re: Please Help... <3
nice well it works but just wondering what are the things u added in and what to they do?
Re: Please Help... <3 Topic is solved
jprodigylazy2login wrote:nice well it works but just wondering what are the things u added in and what to they do?
Code: Select all
#ifWinActive World of Warcraft ; Only run if window 'World of Warcraft' is active
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
; The following script is run when the user presses the '1' key
; and will loop until the 1 key is no longer pressed, sending
; 1 over and over every delay miliseconds. To use a different
; key, replace all three 1s with the key you want repeated.
delay:=95
$1::
KeyWait, 1 ; Wait until "1" is released
Loop
{
if GetKeyState("1", "p") ; if "1" is pressed break the loop #### you can't just use "GetKeyState("1", "t")" because "Send 1" will "untoggle" it
break
Send 1
Sleep % delay / 2 ; Half the sleep delay to check the KeyState more frequently
if GetKeyState("1", "p") ; if "1" is pressed break the loop
break
Sleep % delay / 2
}
return
Re: Please Help... <3
Alright thanks a bunch man apppreciate the help one last thing tho i love the script works perfectly problem i have tho is when i try to talk it just spams 1 when i press 1 is there a way to make it like start the toggle after i hold it down for more then X amount of seconds. lets say X = 3 secs
Re: Please Help... <3
Code: Select all
;#ifWinActive World of Warcraft ; Only run if window 'World of Warcraft' is active
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
; The following script is run when the user presses the '1' key
; and will loop until the 1 key is no longer pressed, sending
; 1 over and over every delay miliseconds. To use a different
; key, replace all three 1s with the key you want repeated.
delay:=95
toggle_after := 1000
~$*1::
Loop, 4
{
if(!GetKeyState("1", "p")) ; if "1" isn't pressed return
{
return
}
Sleep, % toggle_after / 4
}
Loop
{
if GetKeyState("1", "p") ; if "1" is pressed break the loop #### you can't just use "GetKeyState("1", "t")" because "Send 1" will untoggle it
break
Send 1
Sleep % delay / 2 ; Half the sleep delay to check the KeyState more frequently
if GetKeyState("1", "p") ; if "1" is pressed break the loop
break
Sleep % delay / 2
}
return
Who is online
Users browsing this forum: No registered users and 43 guests