DAOC Live vs DAOC Eden

Ask gaming related questions (AHK v1.1 and older)
Phrack
Posts: 5
Joined: 22 Jan 2023, 18:40

DAOC Live vs DAOC Eden

Post by Phrack » 22 Jan 2023, 20:32

Keystrokes not all firing as intended. Scripts worked fine on DAOC Live, but only a few F keys are firing.

If F keys are hit manually all work as intended, but not using AHK and automatically hitting multiples.

AHK Ver 1.1.36.02
DAOC in Windowed mode.
Attempted all Send methods with same result.
Key delay doesn't correct the issue.

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: DAOC Live vs DAOC Eden

Post by DuckingQuack » 23 Jan 2023, 07:04

I believe you will want to provide more information (perhaps the code itself) to get adequate assistance.

Phrack
Posts: 5
Joined: 22 Jan 2023, 18:40

Re: DAOC Live vs DAOC Eden

Post by Phrack » 23 Jan 2023, 10:04

I was hoping someone may know the differences between the server's and interpretation, but here is the script.

Code: Select all

RETURN
#UseHook
#IfWinActive, ahk_class DAoCMWC

;toggle Script(pauses and resumes script) -UPDATED-
+NumLock::
Suspend,toggle
ToolTip, % A_IsSuspended ? "Script Suspended" : ""
return 

;f1 is the only key that fires, f2 does not. Both work if manually pressed. If I hold down the 1 keys it spams f1 and eventually f2 will trigger. I did attempt trying a keydelay and sleep for troubleshooting, but it did not change the result.
1:: send {f1}{f2}
return

;all keys fire most of the time except f7, it doesn't fire. All work if manually pressed.
2:: send {delete}{f3}{f4}{f6}{f7}
return

;not much of this is working. f10 works, but then starts changing other things unrelated such as changes visible quickbars from 1 to 10, then to 9.
3:: send {f10}{,}{f8}(f9){f11}^{f1}^{f2}
return

;Suspend when typing -NEW-
~NumpadEnter::
~+Enter::
~Enter::
Suspend, Toggle
ToolTip, % A_IsSuspended ? "Script Suspended" : ""
Return

;Other keys that open chat /commands,  console, r reply key -NEW-
~NumpadDiv::
~/::
~'::
~r::
Suspend, On
ToolTip, Script Suspended
Return

;Escape closes chat window -NEW-
~esc::
Suspend, Off
ToolTip
Return

;control v windows default paste command -NEW-
~^v:: 
Suspend, Permit
if A_IsSuspended
SendInput, % Clipboard
Return

#UseHook off

[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: DAOC Live vs DAOC Eden

Post by DuckingQuack » 23 Jan 2023, 12:30

Every example in the documentation uses quotation marks around the string to be sent. I suggest starting there, I’m no expert, but I’ll try digging into it a bit deeper when I get home if the quotes don’t solve it.

https://www.autohotkey.com/docs/v2/lib/Send.htm#SendEvent

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: DAOC Live vs DAOC Eden

Post by DuckingQuack » 23 Jan 2023, 12:46

My mistake, for some reason I assumed this was a v2 script. Please ignore my previous post.

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: DAOC Live vs DAOC Eden

Post by DuckingQuack » 24 Jan 2023, 06:41

@Phrack
Alright, as mentioned previously, I’m no expert (had trouble telling v1 from v2). But that aside, I looked through your script and am having difficulty finding any part that looks incorrect, this is further backed by the fact that you said it worked until you changed from Live to Eden. My first question is, (1) do you have any other scripts running and if so, have you tried running this script alone? On a similar string of thought, (2) are you using any other programs that might interfere with an ahk script? (3) Have you verified the window class is static? (Not a likely issue, but worth checking on.) Lastly, (4) is this the whole script? (I noticed you have “usehook off” at the bottom and return at the top.)

At present, my only decent suggestion is adding {Blind} to the strings that are having issues to verify that modifier keys aren’t “changing” the outputs. Not a very good suggestion, though.

I didn’t have any time last night, but I will look at your script more in depth tonight.

Best of luck,
The Duck

Phrack
Posts: 5
Joined: 22 Jan 2023, 18:40

Re: DAOC Live vs DAOC Eden

Post by Phrack » 24 Jan 2023, 08:53

@DuckingQuack
1. No additional scripts are running.
2. No other known programs that would interfere. It's the same loadout and programs I run on Live.
3. Uncertain how to verify the window class being static.
4. The only thing removed is additional comments that aren't relevant. The layout of the script is a temp someone provided to the community, I only change the 1::, 2:: portions to meet the qbinds in game. Since everything worked previously, I never bothered to check into anything else.

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: DAOC Live vs DAOC Eden

Post by DuckingQuack » 24 Jan 2023, 10:54

@Phrack
Alright, I had an idea that I should have thought of right away. Use Key History to see exactly what inputs AHK is sending and then you’ll have a much better idea of what problems there are. If you see key inputs with key modifiers where they shouldn’t be, then {Blind} at the beginning of your strings will solve that. If that’s not the case, then we’ll try starting from zero with the new info.

Best of luck,
The Duck
Best of Luck,
The Duck

Phrack
Posts: 5
Joined: 22 Jan 2023, 18:40

Re: DAOC Live vs DAOC Eden

Post by Phrack » 26 Jan 2023, 11:02

@DuckingQuack

Thanks for the key history tip, I'm not overly familiar with AHK so didn't know it existed but it helped me find parens typo around f9 in the #3 keypress in the script 3:: send {f10}{,}{f8}(f9){f11}^{f1}^{f2}. There still appears possibly a timing issue for the game to interpret?

Key history shows the #1 key is pressed and AHK sent both F keys as indicated in the script, however the game isn't responding to the F2 send.

Script:
1:: send {f1}{f2}
return

VK SC Type Up/Dn Elapsed Key Window
-------------------------------------------------------------------------------------------------------------
31 002 h d 3.20 1
70 03B i d 0.00 F1
70 03B i u 0.00 F1
71 03C i d 0.02 F2
71 03C i u 0.00 F2
31 002 s u 0.17 1

This is interesting, is the control keys sent like this or should they be sent u/d prior to each keypress of F1 and F2?

Script:
3:: send {f10}{,}{f8}{f9}{f11}^{f1}^{f2}
return

VK SC Type Up/Dn Elapsed Key Window
-------------------------------------------------------------------------------------------------------------
33 004 h d 9.16 3
79 044 i d 0.00 F10
79 044 i u 0.00 F10
BC 033 i d 0.02 ,
BC 033 i u 0.00 ,
77 042 i d 0.02 F8
77 042 i u 0.00 F8
78 043 i d 0.01 F9
78 043 i u 0.00 F9
7A 057 i d 0.02 F11
7A 057 i u 0.00 F11
A2 01D i d 0.01 LControl
70 03B i d 0.00 F1
70 03B i u 0.00 F1
71 03C i d 0.02 F2
71 03C i u 0.00 F2
A2 01D i u 0.02 LControl
33 004 s u 0.01 3

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: DAOC Live vs DAOC Eden

Post by DuckingQuack » 26 Jan 2023, 12:38

I know you mentioned trying SetKeyDelay to resolve the keys being sent but the game not acknowledging them, but was it only the delay duration parameter you used or did you try the key press duration parameter also?

Code: Select all

SetKeyDelay(delay, press, play)
Play mode could potentially help, but that would require testing (it could also make the game unable to recognize the inputs).

Let me know when you have an update.

Best of luck,
The Duck
Phrack wrote:
26 Jan 2023, 11:02
There still appears possibly a timing issue for the game to interpret?

Key history shows the #1 key is pressed and AHK sent both F keys as indicated in the script, however the game isn't responding to the F2 send.

Script:
1:: send {f1}{f2}
return

VK SC Type Up/Dn Elapsed Key Window
-------------------------------------------------------------------------------------------------------------
31 002 h d 3.20 1
70 03B i d 0.00 F1
70 03B i u 0.00 F1
71 03C i d 0.02 F2
71 03C i u 0.00 F2
31 002 s u 0.17 1
Last edited by DuckingQuack on 26 Jan 2023, 18:12, edited 1 time in total.
Best of Luck,
The Duck

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: DAOC Live vs DAOC Eden

Post by DuckingQuack » 26 Jan 2023, 12:50

I believe this is a result of the efficiency the program creates through reducing the amount of messages sent out by the script.

LCtrlDn, F1, F2, LCtrlUp
-and-
LCtrlDn, F1, LCtrlUp, LCtrlDn, F2, LCtrlUp
These are effectively the same, but it’s easy to see which one would execute faster AND with fewer chances of bugs.

So, are you still having issues with that string since finding the typo?

Best of luck,
The Duck
Phrack wrote:
26 Jan 2023, 11:02
This is interesting, is the control keys sent like this or should they be sent u/d prior to each keypress of F1 and F2?

Script:
3:: send {f10}{,}{f8}{f9}{f11}^{f1}^{f2}
return

VK SC Type Up/Dn Elapsed Key Window
-------------------------------------------------------------------------------------------------------------
33 004 h d 9.16 3
79 044 i d 0.00 F10
79 044 i u 0.00 F10
BC 033 i d 0.02 ,
BC 033 i u 0.00 ,
77 042 i d 0.02 F8
77 042 i u 0.00 F8
78 043 i d 0.01 F9
78 043 i u 0.00 F9
7A 057 i d 0.02 F11
7A 057 i u 0.00 F11
A2 01D i d 0.01 LControl
70 03B i d 0.00 F1
70 03B i u 0.00 F1
71 03C i d 0.02 F2
71 03C i u 0.00 F2
A2 01D i u 0.02 LControl
33 004 s u 0.01 3
Best of Luck,
The Duck

Phrack
Posts: 5
Joined: 22 Jan 2023, 18:40

Re: DAOC Live vs DAOC Eden

Post by Phrack » 03 Feb 2023, 10:16

SetKeyDelay(, 30, 15) and other values of press and play. None appeared to have an effect.

Essentially the 1:: portion is the only one that doesn't appear to execute correctly. I suppose I'll just live with it even though it's frustrating, but since the others are executing well enough for me to play I'll leave it as is unless a solution arises later that someone discovers.

Post Reply

Return to “Gaming Help (v1)”