How to Make AHK Work in Most Games - The Basics

Helpful script writing tricks and HowTo's
go1
Posts: 13
Joined: 17 Sep 2018, 17:14

Re: How to Make AHK Work in Most Games - The Basics

09 Jun 2020, 14:46

I want to give a tip here of what i saw,experienced and warned others off.
If you ever use ControlClick or ControlSend for background botting and up on tests you catch that your controlclick clicks invisible windows inside the game(only borders of invisible windows inside the game are shown[visible]) or controlsend does wanky stuff THEN IMMEDIATELY STOP USING IT because your game's anti-cheat is gonna catch you.
Conquer Online 3.0 uses the invisible window control click catching in their anti-cheat.
Ruevil2
Posts: 176
Joined: 14 Jul 2014, 10:39

Re: How to Make AHK Work in Most Games - The Basics

26 Mar 2021, 16:59

Updated: 3-26-2021
cyrexsef
Posts: 25
Joined: 12 Mar 2022, 16:19

Re: How to Make AHK Work in Most Games - The Basics

22 May 2022, 19:34

Anything for tekken?
williams
Posts: 56
Joined: 01 Jan 2015, 08:40

Re: How to Make AHK Work in Most Games - The Basics

24 Jun 2022, 12:53

Any lib recommendations ?
earlbond84
Posts: 19
Joined: 16 Jul 2022, 09:26

Re: How to Make AHK Work in Most Games - The Basics

19 Jul 2022, 00:35

How about using Imageputbuffer, Imagesearch & Pixel Search?

https://github.com/iseahound/ImagePut


[Mod edit: Removed spam link]
surok
Posts: 5
Joined: 06 Nov 2022, 06:21

Re: How to Make AHK Work in Most Games - The Basics

06 Nov 2022, 10:48

Can somebody clarify what "rehooking" means in the fourth step?
4) Some games do not allow their keybinds to be 'hijacked'.
-Explanation: Many games, especially DirectX driven, use driver level keyboard interaction and cannot be
changed via AHK. You need to choose keybindings that the game is NOT using, some people have had
success by changing the in-game keybinds so that those keys are 'free' for AHK to use. Sometimes this
can be overcome by constantly rehooking the keyboard and mouse
. An indicator that this is the case is
that the keys work once or 'for a while' and then stop working completely.
Ruevil2
Posts: 176
Joined: 14 Jul 2014, 10:39

Re: How to Make AHK Work in Most Games - The Basics

23 Jan 2023, 11:54

surok wrote:
06 Nov 2022, 10:48
Can somebody clarify what "rehooking" means in the fourth step?
4) Some games do not allow their keybinds to be 'hijacked'.
-Explanation: Many games, especially DirectX driven, use driver level keyboard interaction and cannot be
changed via AHK. You need to choose keybindings that the game is NOT using, some people have had
success by changing the in-game keybinds so that those keys are 'free' for AHK to use. Sometimes this
can be overcome by constantly rehooking the keyboard and mouse
. An indicator that this is the case is
that the keys work once or 'for a while' and then stop working completely.
Very few games will regularly re-run the keyboard hooking procedure in order to keep themselves in the top priority position.
The only one I have encountered that does this is South Park: Stick of Truth. If this is happening then scripts will work for a
short period of time and then stop working entirely all of the sudden. Restarting the script fixes the hotkeys again until
the game rehooks again and kills the script again. To overcome this you can typically use a Timer to continuously rerun
the #KeyboardHook command. I have added an example to the main post to describe how this is done but it is pretty easy.

Return to “Tutorials (v1)”

Who is online

Users browsing this forum: No registered users and 42 guests