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 


Auto run lua -> script that hides not needed options / bo

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
dario3star
Newbie cheater
Reputation: 0

Joined: 14 Dec 2020
Posts: 23

PostPosted: Sun Mar 28, 2021 8:12 pm    Post subject: Auto run lua -> script that hides not needed options / bo Reply with quote

Hello. I want to hide and not show all checked below in the picture when i launch CE. I don't know what lua code to hide them.
I have some basic cheats already made in .CT and all set perfect. Thanks CE forum Smile



engine.JPG
 Description:
Lua code to auto run and hide all checked menu. Thanks.
 Filesize:  65.24 KB
 Viewed:  1866 Time(s)

engine.JPG


Back to top
View user's profile Send private message AIM Address
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sun Mar 28, 2021 8:41 pm    Post subject: This post has 1 review(s) Reply with quote

Code:

local t = translate

CompactModeEnabled = false

function disableHeaderSorting()
   local addressListHeader = component_getComponent(AddressList, 1)
   setMethodProperty(addressListHeader, 'OnSectionClick', nil)
end

function disableCompactMode()
   control_setVisible(wincontrol_getControl(MainForm, 0), true)
   control_setVisible(wincontrol_getControl(MainForm, 3), true)
   CompactModeEnabled = false
end

function enableCompactMode()
   control_setVisible(wincontrol_getControl(MainForm, 0), false)
   control_setVisible(wincontrol_getControl(MainForm, 3), false)
   CompactModeEnabled = true
end

function toggleCompactMode()
   if CompactModeEnabled then
      disableCompactMode()
   else
      enableCompactMode()
   end
end

function addCompactModeMenu()
   local name = 'miCTCompactMode'
   local miCompactMode = nil
   for i = 1, MainForm.Menu.Items.Count - 1 do
      if MainForm.Menu.Items[i].Name == name then
         miCompactMode = MainForm.Menu.Items[i]
         break
      end
   end
   if miCompactMode == nil then
      miCompactMode = createMenuItem(MainForm.Menu.Items)
      miCompactMode.Name = name
      miCompactMode.Caption = t('Toggle Compact Mode')
      miCompactMode.OnClick = toggleCompactMode
      MainForm.Menu.Items.add(miCompactMode)
   end
end

---- Compact Mode
addCompactModeMenu()

---- An Extra one if you want it.
--disableHeaderSorting()

_________________
Back to top
View user's profile Send private message Visit poster's website
dario3star
Newbie cheater
Reputation: 0

Joined: 14 Dec 2020
Posts: 23

PostPosted: Mon Mar 29, 2021 2:35 am    Post subject: Auto run lua -> script that hides not needed options / bo Reply with quote

Thank you man Smile Now my CE is got cleaner.
Back to top
View user's profile Send private message AIM Address
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