View previous topic :: View next topic |
Author |
Message |
sportyspice Newbie cheater
Reputation: 0
Joined: 06 Apr 2017 Posts: 10
|
Posted: Sat Apr 08, 2017 6:40 pm Post subject: How to remove right margin/vertical line in lua code editor? |
|
|
I'm not sure what I did, but suddenly an annoying vertical line/right margin appeared in my lua editor. I'd really like to get rid of it.
It shows both in the "Lua script: Cheat Table" window, and also in any other custom "LUA Script" window I open.
I'd attach a screenshot but the forum won't let me cause I'm a new user.
|
|
Back to top |
|
 |
panraven Grandmaster Cheater
Reputation: 62
Joined: 01 Oct 2008 Posts: 958
|
Posted: Sat Apr 08, 2017 7:13 pm Post subject: |
|
|
It seems the property RightEdge of TSynEdit Class control (seems sub class of Memo Class) the line:
The follow code change this property for currently opened TfrmAutoInject form where TSynEdit located.
Code: |
for i=0,GetFormCount()-1 do
local fm = GetForm(i)
if fm.ClassName=="TfrmAutoInject" then
local syn = fm.Assemblescreen
syn.RightEdge = 400 -- column?
syn.RightEdgeColor = 0xff -- red
end
end
|
The following code change the right edge for newly opened TfrmAutoInject to a Global value, save the following text in a *.lua file and place this lua file inside autorun directory of installed CE directory to have the effect automatically.
Code: |
GlobalRightEdge = 400
GlobalRightEdgeColor = 0xff -- red
function SynEditRightEdge(frm)
if frm.ClassName=="TfrmAutoInject" then
local timer = createTimer(frm)
timer.Interval = 100
timer.OnTimer = function(tm)
if frm.Assemblescreen then
if GlobalRightEdge then
frm.Assemblescreen.RightEdge = GlobalRightEdge
end
if GlobalRightEdgeColor then
frm.Assemblescreen.RightEdgeColor = GlobalRightEdgeColor
end
tm.Destroy()
end
end
end
end
if SynEditRightEdge_ID then
unregisterFormAddNotification(SynEditRightEdge_ID)
end
SynEditRightEdge_ID = registerFormAddNotification(SynEditRightEdge)
|
_________________
- Retarded. |
|
Back to top |
|
 |
sportyspice Newbie cheater
Reputation: 0
Joined: 06 Apr 2017 Posts: 10
|
Posted: Sat Apr 08, 2017 7:28 pm Post subject: |
|
|
Thank you, that worked perfectly.
I just set it to -1 instead of 400 though.
**EDIT: Actually, with your autonrun script it only removes it from new Lua Script windows, but doesn't remove it from the main Lua Cheat Table window. If I execute the first script you posted manually, then it gets removed but I don't want to do that every time I run cheat engine.
**EDIT2: I just put the original short script you posted in the autorun folder and that worked perfectly, removing the lines from all windows. Cheers!
|
|
Back to top |
|
 |
|