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 


running an AutoHotKey file within CE Trainer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
MikeNoey
Advanced Cheater
Reputation: 0

Joined: 08 Jun 2018
Posts: 64

PostPosted: Thu Jun 14, 2018 1:47 am    Post subject: running an AutoHotKey file within CE Trainer Reply with quote

Hello everybody. As many here know. Some games do not allow keypresses via Lua etc so I have resorted to using AutoHotkey in combination with Lua scripting to achieve my goals. Problem is that some people find it difficult running a Lua script and then an AutoHotKey file. Don't ask me why lol.

Anyway I was wondering if it was somehow possible to put an AutoHotKey file inside a Cheat Engine Trainer and perhaps via Lua scripting have that file run when starting up the trainer. making it simpler for people to use.

If anyone can let me know if this is even possible and point me in the right direction of achieving this I'd really appreciate it. Thanks in advance
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Jun 14, 2018 2:13 am    Post subject: Reply with quote

You can add the file to the table using table->add file

then this code will extract it and run it (example with a .exe but also works with registered extentions)
Code:

output=getCheatEngineDir()..[[\something.exe]]
findTableFile('something').saveToFile(output)
shellExecute(output)



Or, add the file during exe-generation in the trainer using "add file(s)" and then run it using:
Code:

shellExecute(getCheatEngineDir()..[[\something.exe]])

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
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 -> Cheat Engine Lua Scripting 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