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 


Lua script to attach a game process to CE debugger

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
danrevella
Master Cheater
Reputation: 2

Joined: 11 Jun 2008
Posts: 290

PostPosted: Tue Mar 18, 2014 11:19 am    Post subject: Lua script to attach a game process to CE debugger Reply with quote

Hi!!
I have got this script who open in CE a process game with an hotkey:
Code:
function togglePause()
  if first_time then
  local mygame=getForegroundProcess();
  --print(mygame);
  openProcess(mygame);
  pause()
  first_time=nil
  end
  if processPaused then unpause()
                  else   pause()
                  getMainForm().setFocus();
                  end
    processPaused = not processPaused
    end
    if pauseHotkey~=nil then
    pauseHotkey.destroy();
    pauseHotkey=nil
    end
pauseHotkey = createHotkey(togglePause,VK_F12)

If possible I need 2 modifications:
1) instead of open the process attach CE debugger to the target game instead of open it
2) If possible I would like that this script was available in CE menu under the "Help" section.
Many thanks for your support.

Danrevella
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

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

PostPosted: Tue Mar 18, 2014 11:46 am    Post subject: Reply with quote

Use "OpenDialog Class" and "createProcess".


Code:
createProcess(path, parameters OPTIONAL, debug OPTIONAL, breakonentrypoint OPTIONAL):

Creates a process. If debug is true it will be created using the windows debugger
and if breakonentry is true it will cause a breakpoint to occur on entrypoint

_________________
Back to top
View user's profile Send private message MSN Messenger
danrevella
Master Cheater
Reputation: 2

Joined: 11 Jun 2008
Posts: 290

PostPosted: Wed Mar 19, 2014 5:50 am    Post subject: Reply with quote

Thanks, but please may you be so kind whit a real example, I don't understand the syntax of the command.....
"parameter optional", but where may I find the optio... etc.
Back to top
View user's profile Send private message
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