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 


Replacing the Cheat Engine gui with your own

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 345

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

PostPosted: Tue Jan 11, 2011 5:18 pm    Post subject: Replacing the Cheat Engine gui with your own Reply with quote

If you want to make a so called "Trainer-table" then the first thing you want to do is hide the main Cheat Engine window so it won't distract the user

For that you can use the hideAllCEWindows function

Just call hideAllCEWindows() and ce will be gone. You will be of course responsible for making it visible again( unhideMainCEwindow() ), or closing Cheat Engine when you're done (closeCE() ).

e.g:
Code:

hideAllCEWindows();
showMessage("Where did CE go?");
unhideMainCEwindow();
showMessage("Ah, there it is!");




example of a more complex script that uses this method (and can be added to a cheat table)
Code:

if (HaxTableByDBVersion1==nil) then
--do one time initialization only
  HaxTableByDBVersion1=1
  showMessage("This is the first time you ran this table!(Since restarting CE)")
else
--do stuff when it's ran again (e.g destroying windows or reinitializing them)
  showMessage("Welcome back to this table!!! WEEEEE")
end
--this can get executed each time the table is loaded
hideAllCEWindows()
f=createForm()
control_setCaption(f,"WEEE!!!")
control_setSize(f, 200,100)
form_centerScreen(f)
b=createButton(f)
control_setSize(b,100,25)
control_setPosition(b,(200/2)-(100/2), 10) --centers the button on the form
control_setCaption(b,"Click");
function aclick(sender)
  showMessage("Click!");
end
control_onClick(b,aclick)
b2=createButton(f)
control_setSize(b2,100,25)
control_setPosition(b2,(200/2)-(100/2), 10+30) --place the second button 30 pixels under the previous
control_setCaption(b2,"Close");
function aClose(sender)
  r=messageDialog("Are you sure?", mtConfirmation, mbYes, mbNo)
  if (r==mrYes) then
    object_destroy(f)
  end
end
control_onClick(b2, aClose)
function onClose(sender)
  f=nil
  b=nil
  b2=nil
  showMessage("NUUUUUUUUUUUUuuuuuuuuuuuuuu!");
  unhideMainCEwindow(); 
end
form_onClose(f,onClose)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
ubiByte
Advanced Cheater
Reputation: 1

Joined: 08 Mar 2013
Posts: 57

PostPosted: Thu Sep 26, 2013 10:18 pm    Post subject: Reply with quote

Hey DarkByte,

That seems pretty neat, the methods your using are not available to the public right? Do you have an API that you can share with us so we can see what other commands are available?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 345

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

PostPosted: Fri Sep 27, 2013 3:06 am    Post subject: Reply with quote

Everyone can do this. This is just lua script.
Read main.lua for a list of all commands

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
STN
I post too much
Reputation: 34

Joined: 09 Nov 2005
Posts: 2530

PostPosted: Thu Jun 26, 2014 8:46 pm    Post subject: Reply with quote

wow, this is pretty damn nice!.

It does give me access violation after i close it but probably cause its a very old code.

_________________
Cheat Requests/Tables- Fearless Cheat Engine
http://fearlessrevolution.com
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 Tutorials -> LUA Tutorials 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 cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites