Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Is there a way to integrate Cheat Engine with AutoHotkey?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
tkx
Newbie cheater
Reputation: 0

Joined: 28 Jul 2010
Posts: 14

PostPosted: Sun Nov 17, 2013 1:36 am    Post subject: Is there a way to integrate Cheat Engine with AutoHotkey? Reply with quote

I've created an auto-assembler script to record some values of stats of a game to user-defined symbols inside of Cheat Engine. I've also written in the same auto-assembler script code that executes if the HP drops below a certain point (chicken script).

Right now I can exit the game using a WinAPI call that kills the process, but I would like a way to click the logout button, so I don't have to restart the game every time it happens.

I've also created an AutoHotkey function that does the clicking in the correct spot, but I don't have any way to integrate the two tools.

Questions:

1. Does the auto-assembler have a way to click or press keys or send input? Perhaps by calling a Lua script if that's possible? I'm not very familiar with Lua or its integration with the auto-assembler.

2. Can I call an AutoHotkey function from within the auto-assembler?

3. If not, can I read userdefined symbols from within Autohotkey (so I can read the HP values and make a script in AHK that continually checks the HP).

4. If none of the above, does anyone have any ideas on how I could send input to the game from within the auto-assembler, or otherwise integrate Cheat Engine and AutoHotkey?

Thanks in advance for the help.
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sun Nov 17, 2013 6:05 am    Post subject: Reply with quote

Cheat Engine modified lua cannot do mouse events, but it can do keyboard events.
Example

Code:

LuaCall(doKeyPress(VK_F1)) // Calls the lua function doKeyPress(Cheat engine function).


You must integrate AHK with LUA firstly (Check http://www.autohotkey.com/board/topic/40690-ahk-lua-interop-stdlib-proof-of-concept/).

I doubt you can read AHK defined symbols via Cheat Engine.
Anyway goodluck.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Nov 17, 2013 10:55 am    Post subject: Reply with quote

Not sure what you are trying to accomplish, but is this for a browser-based game, or a traditional PC game? If it's the latter, a simple assembly script can be written to perform mouse movements and clicks, as well as keyboard key presses etc..

If it's a browser-based game, you may have to incorporate a script that targets multiple processes.
Back to top
View user's profile Send private message
tkx
Newbie cheater
Reputation: 0

Joined: 28 Jul 2010
Posts: 14

PostPosted: Sun Nov 17, 2013 4:17 pm    Post subject: Reply with quote

DaSpamer wrote:
Cheat Engine modified lua cannot do mouse events, but it can do keyboard events.
Example

Code:

LuaCall(doKeyPress(VK_F1)) // Calls the lua function doKeyPress(Cheat engine function).


Thanks for the tip. With this information, I made a lua function and created a timer in my auto-assembler script that checked a variable set only when the HP decreased below a certain amount.

doKeyPress activated my AHK script without any extra stuff needed, so it actually worked out quite nicely.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Mon Nov 18, 2013 5:56 pm    Post subject: Reply with quote

From what I know, AutoHotkey can read address value.

Method I

1. With CheatEngine create script that checks our hero current Health value
If health is lower than 30%, write 1 to "special address"

2. Inside AutoHotkey you need this loop:
check value kept inside "special address". If value is zero, do nothing.
Else, do mouse events.

Method II

1. With CheatEngine create script that writes Health address to "special address".

2. Inside AutoHotkey, this loop:
read "special address" value. (this value is Health address)
check Health value, If value is zero, do nothing.
Else, do mouse events.


Summary:
In the first method, CE communicates with AutoHotkey, gives command.
In the second method, CE pass actual HP address to AutoHotkey, AutoHotkey takes HP address, then checks HP value.

"special address" can be 0x00400500 or 0x01000500, or ..... (you have to find out free static address you can use)

_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites