View previous topic :: View next topic |
Author |
Message |
Game Hacking Dojo Expert Cheater Reputation: 1
Joined: 17 Sep 2023 Posts: 211
|
Posted: Sat May 11, 2024 12:55 pm Post subject: Create a Button in the Main Form |
|
|
I'm trying to make a button right next to the existing button "memory view". Could you please help me with it?
it's a child of MainForm.Panel5
For the dimensions and functionality, I'll figure out I suppose. |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 34
Joined: 16 Feb 2017 Posts: 1418
|
|
Back to top |
|
|
Game Hacking Dojo Expert Cheater Reputation: 1
Joined: 17 Sep 2023 Posts: 211
|
Posted: Sat May 11, 2024 2:46 pm Post subject: |
|
|
Thank you that worked but I couldn't figure out how to launch Lua Engine.
I tried
Code: | getLuaEngine().Show()
getLuaEngine().DoClick()
CreateLuaEngine() |
This's my code:
Code: | if btnLuaEngine then btnLuaEngine.Destroy() btnLuaEngine = nil end
btnLuaEngine = createButton(getMainForm().Panel5)
btnLuaEngine.Height = getMainForm().btnMemoryView.Height
btnLuaEngine.Top = getMainForm().btnMemoryView.Top
btnLuaEngine.Width = getMainForm().btnMemoryView.Width - 50
btnLuaEngine.Left = getMainForm().btnMemoryView.Width + 10
btnLuaEngine.Caption = "Lua Engine"
btnLuaEngine.OnClick = getLuaEngine().doClick()
btnLuaEngine.ShortCut = "Ctrl+L"
getMainForm().OnResize = function()
btnLuaEngine.Left=getMainForm().btnMemoryView.Width + 10
end |
Thank you for helping "Tesekkur ederim)" |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 34
Joined: 16 Feb 2017 Posts: 1418
|
Posted: Sat May 11, 2024 2:58 pm Post subject: |
|
|
Code: | getLuaEngine().cbShowOnPrint.Checked=true
--getLuaEngine().hide()
getLuaEngine().show()
print(11)
sleep(3000)
getLuaEngine().MenuItem5.doClick() --lua engine clear output
print(12) |
_________________
|
|
Back to top |
|
|
Game Hacking Dojo Expert Cheater Reputation: 1
Joined: 17 Sep 2023 Posts: 211
|
Posted: Sat May 11, 2024 3:12 pm Post subject: |
|
|
Thank you it works )
Last edited by Game Hacking Dojo on Sat May 11, 2024 3:17 pm; edited 1 time in total |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 34
Joined: 16 Feb 2017 Posts: 1418
|
Posted: Sat May 11, 2024 3:15 pm Post subject: |
|
|
In my case this code works just fine.
Code: | if btnLuaEngine then btnLuaEngine.Destroy() btnLuaEngine = nil end
btnLuaEngine = createButton(getMainForm().Panel5)
btnLuaEngine.Height = getMainForm().btnMemoryView.Height
btnLuaEngine.Top = getMainForm().btnMemoryView.Top
btnLuaEngine.Width = getMainForm().btnMemoryView.Width - 50
btnLuaEngine.Left = getMainForm().btnMemoryView.Width + 10
btnLuaEngine.Caption = "Lua Engine"
btnLuaEngine.OnClick = function() getLuaEngine().show() end
btnLuaEngine.ShortCut = "Ctrl+L"
getMainForm().OnResize = function()
btnLuaEngine.Left=getMainForm().btnMemoryView.Width + 10
end |
_________________
|
|
Back to top |
|
|
Game Hacking Dojo Expert Cheater Reputation: 1
Joined: 17 Sep 2023 Posts: 211
|
Posted: Sat May 11, 2024 3:18 pm Post subject: |
|
|
thx a lot |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 34
Joined: 16 Feb 2017 Posts: 1418
|
Posted: Sat May 11, 2024 3:32 pm Post subject: |
|
|
Edited;
The button may not have a shortcut assignment (ShortCut).
Create as below.
Also, when Lua Script is open, "Ctrl+L" may conflict with another function that will load a library.
Think about these again.
Code: | --getLuaEngine().show()
if btnLuaEngine then btnLuaEngine.Destroy() btnLuaEngine = nil end
btnLuaEngine = createButton(getMainForm().Panel5)
btnLuaEngine.Height = getMainForm().btnMemoryView.Height
btnLuaEngine.Top = getMainForm().btnMemoryView.Top
btnLuaEngine.Width = getMainForm().btnMemoryView.Width - 50
btnLuaEngine.Left = getMainForm().btnMemoryView.Width + 10
btnLuaEngine.Caption = "Lua Engine"
btnLuaEngine.OnClick = function() getLuaEngine().show() end
if leBtnKey then leBtnKey.Destroy() end
leBtnKey=createHotkey(function() sleep(200) getLuaEngine().show() end, VK_LCONTROL,VK_G)
--btnLuaEngine.ShortCut = "CTRL+L"
getMainForm().OnResize = function()
btnLuaEngine.Left=getMainForm().btnMemoryView.Width + 10
end |
_________________
|
|
Back to top |
|
|
Game Hacking Dojo Expert Cheater Reputation: 1
Joined: 17 Sep 2023 Posts: 211
|
Posted: Sat May 11, 2024 3:57 pm Post subject: |
|
|
there's one last thing I guess. The button appears and works fine. However, the button stays where it is and doesn't change or move accordingly with the form. |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 34
Joined: 16 Feb 2017 Posts: 1418
|
Posted: Sat May 11, 2024 4:16 pm Post subject: |
|
|
That's fine.
Since it is indexed to the "Memory Wiev" button, it maintains equal spacing and remains in the same position as it.
Otherwise, the "Memory Wiev" button should also move and this will upset the balance.
This version of the code provides a balanced representation.
What do you want it to do? _________________
|
|
Back to top |
|
|
Game Hacking Dojo Expert Cheater Reputation: 1
Joined: 17 Sep 2023 Posts: 211
|
Posted: Sat May 11, 2024 4:21 pm Post subject: |
|
|
When I resize the window the button remains in the exact place and doesn't move dynamically with "memory view" button
I used this but it didn't help in that regard
Code: | getMainForm().OnResize = function()
btnLuaEngine.Left = getMainForm().btnMemoryView.Width + 10
btnLuaEngine.Top = getMainForm().btnMemoryView.Top
btnLuaEngine.Height = getMainForm().btnMemoryView.Height
end |
Edit:
it only happens when I resize the table view. So probably I'll just do the same as this Code: | getMainForm().OnResize = function() | using the table window class instead. I'll find it
Edit 2:
I worked by also adding the same for the table area (Panel1)
Code: | getMainForm().OnResize = function()
btnLuaEngine.Left = getMainForm().btnMemoryView.Width + 10
btnLuaEngine.Top = getMainForm().btnMemoryView.Top
btnLuaEngine.Height = getMainForm().btnMemoryView.Height
end
getMainForm().Panel1.OnResize = function()
btnLuaEngine.Left = getMainForm().btnMemoryView.Width + 10
btnLuaEngine.Top = getMainForm().btnMemoryView.Top
btnLuaEngine.Height = getMainForm().btnMemoryView.Height
end |
Thank you )) |
|
Back to top |
|
|
|