Hey Guys,
I'm using ahk scripts to change my hotkeys, but mine stopped working somehow.
It's disabling as soon as I tab into CoH2.
Heres the content:
#IfWinActive, Company Of Heroes 2
{
;;;;;;;;;;;;; return enables normal chat
Return::
Suspend
if ( A_IsSuspended ){
Send {Enter}
}
if ( !A_IsSuspended ){
Send {Enter}
}
return
;;;;;;;;;;;;; shift + return enables normal chat
+Return::
Suspend
if ( A_IsSuspended ) {
Send +{Enter}
}
if ( !A_IsSuspended ) {
Send +{Enter}
}
return
;;;;;;;;;;;;; alt for tactical map
Lctrl::Numpad0
;;;;;;;;;;;;; disables "jump to newest event", adds release of wasd keys to "catch" camera when camera keys are stuck
Space:end {Up up}{Down up}{Left up}{Right up}
;;;;;;;;;;;;; prevention of camera movement being stuck and lifting wasd keys also stop camera keys (WIP: key lose normal functionality)
;w up:end {Up up}
;s up:end {Down up}
;a up:end {Left up}
;d up:end {Right up}
;;;;;;;;;;;;; normal function
#if !GetKeyState("LCtrl", "P"")
{
w::Up
s:own
a::Left
d::Right
}
}
I hope somebody can help me out!
Greetings!
ahk script not working
26 Dec 2020, 19:14 PM
#1
Posts: 15
26 Dec 2020, 21:43 PM
#2
Posts: 1614 | Subs: 3
No idea why it bugs out for you, but you can make some parts of your script simpler, below is what I use.
Re-enable chat:
Multi-functional WASD keys that don't get stuck (order is important):
Re-enable chat:
Code
; Suspend script when opening chat and reenable script when sending message
*~Enter::Suspend
Multi-functional WASD keys that don't get stuck (order is important):
Code
; Disable Control Key except as modifier key
*LCtrl::return
; Set Space to Control
*Space::LCtrl
; Following 3 sections: WASD functions as arrow keys if Control is held down and as WASD if not.
w Up::Send {up Up}{w Up}
a Up::Send {left Up}{a Up}
s Up::Send {down Up}{s Up}
d Up::Send {right Up}{d Up}
#if GetKeyState("LCtrl", "P")
w::up
a::left
s::down
d::right
#if !GetKeyState("LCtrl", "P")
w::w
a::a
s::s
d::d
28 Dec 2020, 13:17 PM
#3
Posts: 830 | Subs: 3
@JibberJabberJobber out of curiosity why mapping LCtrl to Space key and not use directly space key ?
(You can use the bbcode [code] to avoid smiley detection. ^^)
(You can use the bbcode [code] to avoid smiley detection. ^^)
30 Dec 2020, 01:22 AM
#4
Posts: 1614 | Subs: 3
@JibberJabberJobber out of curiosity why mapping LCtrl to Space key and not use directly space key ?
It's kinda deceiving, GetKeyState("LCtrl", "P") looks at the original LCtrl key, not the input LCtrl.
(You can use the bbcode [code] to avoid smiley detection. ^^)
Thanks, I was looking for something like that.
PAGES (1)
1 user is browsing this thread:
1 guest
Livestreams
17 | |||||
139 | |||||
65 | |||||
29 | |||||
18 | |||||
12 | |||||
5 | |||||
2 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.270144.652+2
- 2.278110.716+16
- 3.558230.708+2
- 4.422.955+12
- 5.253150.628+14
- 6.29547.863+1
- 7.399200.666+8
- 8.8120.802-1
- 9.13556.707+3
- 10.19078.709+4
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
7
Download
791
Board Info
463 users are online:
463 guests
4 posts in the last 24h
21 posts in the last week
149 posts in the last month
21 posts in the last week
149 posts in the last month
Registered members: 45481
Welcome our newest member, agtaniet36
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, agtaniet36
Most online: 2043 users on 29 Oct 2023, 01:04 AM