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
210 | |||||
33 | |||||
16 | |||||
3 | |||||
1 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.34957.860+14
- 3.589215.733+4
- 4.1099614.642-1
- 5.280162.633+8
- 6.305114.728+1
- 7.916405.693-2
- 8.271108.715+22
- 9.721440.621+3
- 10.1041674.607-2
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
9
Download
1231
Board Info
616 users are online:
616 guests
2 posts in the last 24h
8 posts in the last week
40 posts in the last month
8 posts in the last week
40 posts in the last month
Registered members: 49065
Welcome our newest member, Huhmpal01
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Huhmpal01
Most online: 2043 users on 29 Oct 2023, 01:04 AM