Hi there,
first im totaly new to AHK and have a lot of trouble with it.
I downloaded Macro Creator with the hope it makes things easier for me but I still don't get what I want.
I need a Script where the Keys 1, 2 and 3 are pressed with different and independent times. Key 1 with 4100, Key 2 with 11400 and Key 3 with 120000.
Everything I got so far is that it presses either only 1 key in a loop or it loops key 2 wait 11400 AND 4100 then presses key 1 AND waits another 11400 and then maybe presses key 2 again.
I tried it with 2 loops but then it doesnt really loop anything.
I found this script and it works very well (with 1 keypress) but i would like it to have it magic happen to all 3 keys with the 3 different times (independent of each other)
toggle = 0
#MaxThreadsPerHotkey 2
F1::
Toggle := !Toggle
While Toggle{
Send 2
sleep 11500
}
return
Maybe somebody can help me. Would be Awesome.
Diablo 3 Key loops Topic is solved
Re: Diablo 3 Key loops Topic is solved
Try this.
Reference this: http://www.autohotkey.com/board/topic/8 ... nt-timers/
Reference this: http://www.autohotkey.com/board/topic/8 ... nt-timers/
Code: Select all
#SingleInstance Force
F1::
If (Toggle = "")
{
GoSub, Loop1
GoSub, Loop2
GoSub, Loop3
GoSub, Loop4
SetTimer, Loop1, 4100
SetTimer, Loop2, 11400
SetTimer, Loop3, 120000
}
If !(Toggle := !Toggle)
Pause
return
F5::Reload
Loop1:
Send, 1
return
Loop2:
Send, 2
return
Loop3:
Send, 3
return
Re: Diablo 3 Key loops
This script works the way I want but i discovered, that it doesn't execute the button press when i'm hitting the right mousebutton at the same time. is this a scriptissue or is this gamebased?
But anyways. thank you very much for the help. this helps me alot.
But anyways. thank you very much for the help. this helps me alot.
Re: Diablo 3 Key loops
1) Find out if AHK is seeing the keypress.
Easiest way is to put the line SoundBeep in the hotkey definition.
2) You may want to try prefixing the hotkey with * to make it "wild" (eg *F1::), but RMB should not affect this.
Easiest way is to put the line SoundBeep in the hotkey definition.
2) You may want to try prefixing the hotkey with * to make it "wild" (eg *F1::), but RMB should not affect this.
Re: Diablo 3 Key loops
This is game based. Just send the keypress a few times with a small sleep in the middle. I have this issue sometimes with my Nostromo gamepad without AHK even on.
-
- Posts: 1
- Joined: 02 Jul 2019, 12:02
Re: Diablo 3 Key loops
this solution works, but is there any way to make it activate and desactivate with only 1 key? it pauses and has to be refreshed with f5 so we can activate again, is there any other way?
Re: Diablo 3 Key loops
Hallo gumegasonic,
just replace Pause by Reload. Then you only need F1.
just replace Pause by Reload. Then you only need F1.
Who is online
Users browsing this forum: No registered users and 55 guests