View previous topic :: View next topic |
Author |
Message |
_Iuri Newbie cheater Reputation: 0
Joined: 08 Jul 2021 Posts: 13
|
Posted: Sat Jul 31, 2021 10:34 am Post subject: How make a a Lua Window be under CE |
|
|
Hi everyone, i have this script to replace the Lua Output Window, but this window is always over CE main window. So ¿how can i make a Lua Window under CE Main window?
Also i want to add a new item in the AddressList popup menu ¿how can i do this?
Description: |
|
Download |
Filename: |
outputwindow.lua |
Filesize: |
3.96 KB |
Downloaded: |
123 Time(s) |
|
|
Back to top |
|
|
_Iuri Newbie cheater Reputation: 0
Joined: 08 Jul 2021 Posts: 13
|
Posted: Sun Aug 01, 2021 5:57 pm Post subject: |
|
|
Nobody can answer my question? :/
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Mon Aug 02, 2021 11:08 am Post subject: |
|
|
Well the reason I stripped down the lua engine window (in my Notepad+ Script Editor extension) was so we could execute code and see its output/errors without an additional window, but in your case to just display logs why not simply hide everything and just keep the memo visible in the lua engine window instead of using a timer, function overloading and such.
Like this:
Code: | local le = getLuaEngine()
for i=0,le.ComponentCount-1 do
local c = le.Component[i]
if (c.Name == "mOutput") then
c.Align = 'alClient';
c.Parent = le; -- change parent object from groupbox to form
else
c.visible = false;
end
end |
You could alternatively disable popup on show (LuaEngineForm...), create a form and memo and overload the mOutput(luaengineform tmemo object) onChange event and simply copy the memo text over yours.
Regarding "its always stays on top", this occurs when using autorun files MainForm gets assigned as the parent object, if you were to execute it in lua engine window or lua script form then the same symptoms would happen but with these windows.
You have to set form PopupMode to 'pmNone' to fix that (I'm not sure why it is not by default).
Code: | tdebug.PopupMode = 'pmNone' |
At the end of the CE Notepad+ Script Editor source there is the script that I used to add an item to the addresslist
Code: | -- @DB : https://forum.cheatengine.org/viewtopic.php?p=5567408#5567408
local al = getAddressList();
if (al.PopupMenu) then
local popMenu = al.PopupMenu;
local ItemExists = popMenu.open_in_script_editor;
if (ItemExists) then
ItemExists.name = '';
ItemExists.destroy();
end
local Item = createMenuItem(popMenu);
Item.Name = 'open_in_script_editor';
Item.Shortcut = "CTRL+SPACE";
Item.Caption = 'Open in script editor';
Item.OnClick = function(sender)
local selectedItems = al.getSelectedRecords();
if (selectedItems) then
for k,memrecord in pairs(selectedItems) do
if (memrecord.Type == vtAutoAssembler) then -- onyl autoassemble scripts
if (not scriptForm.visible) then
scriptForm.show();
end
selectedView.openFile(memrecord);
end
end
end
end
local _onpopup = popMenu.OnPopup;
if (_onpopup) then
popMenu.OnPopup = function(sender)
Item.Visible = al.SelCount > 0;
_onpopup(sender);
end
else
popMenu.OnPopup = function(sender)
Item.Visible = al.SelCount > 0;
end
end
popMenu.Items.add(Item);
end |
_________________
|
|
Back to top |
|
|
|