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 


CE hotkeys

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 205

PostPosted: Sun May 31, 2020 7:02 pm    Post subject: CE hotkeys Reply with quote

I want to add a hotkey to call the “Show Cheat Table Lua Script” window with the F12 hotkey, to have two hotkeys for this: F12 and ctrl + alt + L.
And want to add a hotkey to main CE window, to execute script from the "Show Cheat Table Lua Script" window using the Ctrl + F9 hotkeys. Is there any way to do this?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Mon Jun 01, 2020 1:00 am    Post subject: Reply with quote

Code:

local hiddenmi=createMenuItem(MainForm.Menu)
hiddenmi.Caption='Also show show table script because ShortcutKey2 is not working'
hiddenmi.OnClick=MainForm.miShowLuaScript.OnClick
hiddenmi.ShortCut=textToShortCut('F12')
hiddenmi.Visible=false

MainForm.miTable.insert(0,hiddenmi)

MainForm.miShowLuaScript.ShortCutKey2=hiddenmi.ShortCut --visually

_________________
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
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 205

PostPosted: Mon Jun 01, 2020 1:49 am    Post subject: Reply with quote

Thanks. I often use the on-screen keyboard. What can I say, 1 hotkey will be faster than 3.
Is it possible to create hotkey Ctrl + F9 for main CE window, to execute script from the "Show Cheat Table Lua Script"
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Mon Jun 01, 2020 2:26 am    Post subject: Reply with quote

Code:

local i
for i=0, getFormCount()-1 do
  local f=getForm(i)
  if f.ClassName=='TfrmAutoInject' then
    if f.ScriptMode=='smLua' then
      frmLuaTableScript=f
    end
  end
end

if frmLuaTableScript==nil then
  return
end

local miExecuteTableScript=createMenuItem(MainForm.Menu)
miExecuteTableScript.Caption='Execute Table Script'
miExecuteTableScript.OnClick=frmLuaTableScript.Button1.OnClick
miExecuteTableScript.ShortCut=textToShortCut("Ctrl+F9")
miExecuteTableScript.Visible=true --change to false if you don't want the item visible
MainForm.miTable.insert(1,miExecuteTableScript)

_________________
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
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 205

PostPosted: Mon Jun 01, 2020 2:31 pm    Post subject: Reply with quote

Great. I need these functions, because I use them a hundred times in a day. Many thanks.
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