Search found 13 matches

by jayblah
24 May 2022, 11:15
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

Hey, I did some searching and found a thread to which you had responded to for captions. Based on that, I've come up with this: winTitle = ahk_exe game.exe #MaxThreadsPerHotkey 2 #If WinActive(winTitle) $q:: SoundBeep, 1000, 250 SetTimer, Q, 250 text = Spam ON Gui, -Caption +AlwaysOnTop Gui, Font, s...
by jayblah
22 May 2022, 21:02
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

I think I got it now, Mikey:

Code: Select all

#MaxThreadsPerHotkey 2

#If WinActive(winTitle)

$q::
SoundBeep, 500
SetTimer, Q, 250

Q:
Send q
Return

QStop:
SetTimer,, Off
SetTimer, Q, Off
SoundBeep, 1000
Return

~z::
Loop, Parse, % "q"
Gosub, %A_LoopField%Stop
SoundBeep, 1000
Return
by jayblah
22 May 2022, 20:55
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

Hrm. Still not having any success getting it to work. Consider this: q::SetTimer, q Up, % (q := !q) ? 250 : "Off" q Up::Send % q ? "!q" : "" SoundBeep, 500 ~z:: Loop, Parse, % "q Up" Gosub, %A_LoopField%Stop SoundBeep, 1000 Return Problem: I get an error here. It says: Error: Target label does not e...
by jayblah
22 May 2022, 19:24
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

When I try: ~z:: Loop, Parse, % "qrd" Gosub, %A_LoopField%Stop Return (Note: I added "q" and "d" because I want Q, R, and D to stop being sent.) When I added the above to the code: winTitle = ahk_exe HeroesOfTheStorm_x64.exe #MaxThreadsPerHotkey 2 #If WinActive(winTitle) q::SetTimer, q Up, % (q := !...
by jayblah
22 May 2022, 15:31
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

Heya Mikey, Can you teach me how to improve this script as follows? winTitle = ahk_exe game.exe #MaxThreadsPerHotkey 2 #If WinActive(winTitle) q::SetTimer, q Up, % (q := !q) ? 250 : "Off" q Up::Send % q ? "!q" : "" ;w::SetTimer, w Up, % (w := !w) ? 250 : "Off" ;w Up::Send % w ? "!w" : "" ;e::SetTime...
by jayblah
20 May 2022, 09:51
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

There are various ways but not necessarily better. F1:: Loop, Parse, % "qwerdz" { %A_LoopField% := False SetTimer, %A_LoopField% Up, Off } SoundBeep, 1000 Return That worked. Thank you. I tried using "z" as the global on/off toggle instead of F1, and that didn't appear to work. I suspect that's bec...
by jayblah
19 May 2022, 19:27
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

You're awesome. So, using your example, I just did the following: winTitle = ahk_exe HeroesOfTheStorm_x64.exe #MaxThreadsPerHotkey 2 #If WinActive(winTitle) q::SetTimer, q Up, % (q := !q) ? 500 : "Off" q Up::Send % q ? "!q" : "" w::SetTimer, w Up, % (w := !w) ? 500 : "Off" w Up::Send % w ? "w" : "" ...
by jayblah
19 May 2022, 16:02
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

OK. An update is below. The ternary operator acts like "If... then... else...", so the key is sent only if on is set. winTitle = ahk_exe gameprocess.exe #MaxThreadsPerHotkey 2 #If WinActive(winTitle) F1:: on := !on SetKeyDelay, 110 While on For each, key in ["!q", "r", "d"] Send % on ? key : "" Ret...
by jayblah
15 May 2022, 14:54
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

Thank you for your help, that worked.
by jayblah
14 May 2022, 23:53
Forum: Gaming Help (v1)
Topic: How do send LAlt+Q in a parse statement?
Replies: 1
Views: 210

How do send LAlt+Q in a parse statement?

winTitle = ahk_exe gameprocess.exe #MaxThreadsPerHotkey 2 #If WinActive(winTitle) F1:: on := !on SetKeyDelay, 110 While on Loop, Parse, % "qrd" Send % on ? A_LoopField : "" Return #If I'd like to send LAlt+Q instead of just Q in this code: " Loop, Parse, % "qrd" How do I do that? I assume Loop, Par...
by jayblah
14 May 2022, 22:49
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

I'd like to send LAlt+Q instead of just Q in this code: " Loop, Parse, % "qrd"

How do I do that? I assume Loop, Parse, % "!qrd" will not work? Also, what exactly is the line Send % on ? A_LoopField : "" doing?
by jayblah
14 May 2022, 22:43
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Re: Help with sending keys to a game. Topic is solved

Welcome to this AutoHotkey forum! Use lowercase letters. Add #MaxThreadsPerHotkey 2 to the top. If you and AHK are both acting at the same time, your actions could collide. winTitle = ahk_exe gameprocess.exe #MaxThreadsPerHotkey 2 #If WinActive(winTitle) F1:: on := !on SetKeyDelay, 110 While on Loo...
by jayblah
14 May 2022, 21:53
Forum: Gaming Help (v1)
Topic: Help with sending keys to a game. Topic is solved
Replies: 20
Views: 4983

Help with sending keys to a game. Topic is solved

#IfWinActive ahk_exe gameprocess.exe F1:: Toggle := !Toggle While Toggle { Send !Q Sleep 100 Send R Sleep 100 Send D Sleep 100 } Return Hello, I need help with the above script. The issues are as follows: 1. The F1 key is not consistently stopping the key spam. 2. The script spams even outside the s...

Go to advanced search