Login

russian armor

ahk script not working

26 Dec 2020, 19:14 PM
#1
avatar of blade141

Posts: 15

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::Send {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::Send {Up up}
;s up::Send {Down up}
;a up::Send {Left up}
;d up::Send {Right up}

;;;;;;;;;;;;; normal function
#if !GetKeyState("LCtrl", "P&quot")
{

w::Up
s::Down
a::Left
d::Right
}

}


I hope somebody can help me out!
Greetings!
26 Dec 2020, 21:43 PM
#2
avatar of JibberJabberJobber

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:
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
avatar of Mithiriath
Director of Social Media Badge

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. ^^)

30 Dec 2020, 01:22 AM
#4
avatar of JibberJabberJobber

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.
0 user is browsing this thread:

SHOUT IT OUT!

No ProfanityNumber of ShoutsRefresh Shout Box
Willy Pete: @Rosbone Ahh I missed that memo. I still think its a bad decision though. Adds frustration for players and isnt gonna make them that much money
Last Thursday, 15:46 PM
Rosbone: It is also good they left it free until after the free to play weekend. Points for that.
Last Thursday, 09:34 AM
Rosbone: But I agree, the cost to get a full decent Coh game pushing $115 US is not the best idea. Especially when it needs so much more work for casuals.
Last Thursday, 09:32 AM
Rosbone: To be fair, it was a thank you to early fans right? They said it was not free for long and it would become a pay DLC at some point.
Last Thursday, 09:30 AM
Willy Pete: Re-releasing free DLC so they can charge new players money for it. Brilliant marketing strategy :clap:
Last Thursday, 04:31 AM
Soheil: Coh2 still broken server ?
Last Tuesday, 18:27 PM
Rosbone: Congrats to Relic. Looks like Coh3 has finally usurped Coh2 s the popular Coh. You smell terrific. :snfQuinn:.
24 Mar 2025, 02:46 AM
Nickbn: and again someone else replies. I mean come on guys. Give @adamírcz a chance
22 Mar 2025, 14:00 PM
Willy Pete: @Nickbn you didn't ask a question, and this is a chat box...
20 Mar 2025, 13:11 PM
Nickbn: @Rosbone it's incredibly rude to speak on someone elses behalf, especially when a question is directly adressed to them. I understand your passion for the subject at hand but I want to hear from him.
20 Mar 2025, 10:16 AM
Rosbone: @Nickbn No, I am just saying people should not be using any Relic owned forum since they have proven they ban anyone who says true things about Coh3.
18 Mar 2025, 19:01 PM
Nickbn: @Rosbone do you speak on his behalf? I didn't know. In that case keep us updated please.
18 Mar 2025, 16:47 PM
Rosbone: #RelicModdedEchoChamber
16 Mar 2025, 17:54 PM
Rosbone: @Nickbn True except, the only people on the Relic Discord/Reddit/Steam are brain washed monkey zealots. They wont even understand what @adamírcz is talking about. Anyone else is banned.
16 Mar 2025, 17:54 PM
Nickbn: @adamírcz might be a better idea to voice this to relic directly than to voice it here, in a shoutbox of a nearly deade fansite #justsaying...
16 Mar 2025, 16:36 PM
webdesign-muenchen-w: @Rosbone it is sick
14 Mar 2025, 22:09 PM
aerafield: @adamírcz aren't the first two disconnects free every day?
14 Mar 2025, 19:26 PM
Rosbone: It is so unlike Relic to punish its fans and community.
14 Mar 2025, 12:07 PM
adamírcz: So, I just got a leaver penalty without even getting onto the loading screen because of the game disconnecting, bravo Relic
14 Mar 2025, 10:45 AM
Rosbone: It is an indicator of the very short sighted capitalist view that plagues any company where leadership does not understand the product.
13 Mar 2025, 20:00 PM

Livestreams

New Zealand 132
Germany 464
unknown 14
unknown 11

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

830 users are online: 830 guests
3 posts in the last 24h
9 posts in the last week
72 posts in the last month
Registered members: 53080
Welcome our newest member, web_012developer
Most online: 2043 users on 29 Oct 2023, 01:04 AM