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
71 | |||||
36 | |||||
35 | |||||
24 | |||||
22 | |||||
12 | |||||
614 | |||||
17 | |||||
2 | |||||
2 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.653231.739+13
- 2.838223.790+1
- 3.35057.860+15
- 4.590233.717+6
- 5.278108.720+29
- 6.306114.729+2
- 7.645.928+5
- 8.922406.694+1
- 9.1118621.643-1
- 10.265138.658+2
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
10
Download
1243
Board Info
650 users are online:
650 guests
0 post in the last 24h
2 posts in the last week
28 posts in the last month
2 posts in the last week
28 posts in the last month
Registered members: 49389
Welcome our newest member, Haruta446
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Haruta446
Most online: 2043 users on 29 Oct 2023, 01:04 AM