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
8 | |||||
842 | |||||
17 | |||||
6 | |||||
6 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.595215.735+10
- 3.34957.860+14
- 4.1101614.642+2
- 5.305114.728+1
- 6.916405.693-2
- 7.273108.717+24
- 8.721440.621+3
- 9.1041674.607-2
- 10.17146.788+1
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
9
Download
1233
Board Info
558 users are online:
558 guests
0 post in the last 24h
8 posts in the last week
37 posts in the last month
8 posts in the last week
37 posts in the last month
Registered members: 49092
Welcome our newest member, dreilandechode
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, dreilandechode
Most online: 2043 users on 29 Oct 2023, 01:04 AM