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 


Add menuItem for Main CE Form (hide/show some control)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials
View previous topic :: View next topic  
Author Message
GH*master
Expert Cheater
Reputation: 8

Joined: 10 Jan 2008
Posts: 159

PostPosted: Wed Feb 22, 2012 12:37 am    Post subject: Add menuItem for Main CE Form (hide/show some control) Reply with quote

Run Lua-code:

Code:
function StateCompactCEWindow(state)
  controlMainForm = getMainForm()
  separator = wincontrol_getControl(controlMainForm,0)
  Panel1 = wincontrol_getControl(controlMainForm,1)
  Panel4 = wincontrol_getControl(controlMainForm,2)
  Panel5 = wincontrol_getControl(controlMainForm,3)

  control_setVisible(separator, state)
  control_setVisible(Panel4, state)
  control_setVisible(Panel5, state)
end

function CompactCEWindow()
  menuItem_setCaption(newItem1, 'CompactView')
  menuItem_onClick(newItem1, UnCompactCEWindow)
  StateCompactCEWindow(true)
end

function UnCompactCEWindow()
  menuItem_setCaption(newItem1, 'FullView')
  menuItem_onClick(newItem1, CompactCEWindow)
  StateCompactCEWindow(false)
end
------------
  controlMainForm = getMainForm()
  formMenu = form_getMenu(controlMainForm)
  menuItem = menu_getItems(formMenu)

  newItem1 = createMenuItem(menuItem)
  menuItem_add(menuItem, newItem1)
  UnCompactCEWindow()


Also you can use:
Quote:
1) Correct some code with getCEVersion(): Returns a floating point value. Returns 6.2 or higher

2) Create some *.lua in "autorun" folder
3) Or use
require(getCheatEngineDir().."autorun\\xxxxxx\\luaFile")
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 Feb 28, 2012 1:23 pm    Post subject: Reply with quote

NICE! Thank you.
_________________
Back to top
View user's profile Send private message MSN Messenger
yui0900826
Cheater
Reputation: 0

Joined: 09 Aug 2011
Posts: 35
Location: HongKong

PostPosted: Tue Feb 28, 2012 6:13 pm    Post subject: Reply with quote

very convenient, thank you Idea Idea
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