i am currently tinkering around with CE Lua Forms and trying to get the "Auto Assemble Edit" From.
What i am trying to archive is to generate Template Function calls.
I know there are "copy paste" solutions for custom templates but they are op and i dont need all the functionality.
{$lua}
if syntaxcheck then return end
[ENABLE]
for i = 0, getFormCount() - 1 do
local frm = getForm(i)
if frm.ClassName == 'TfrmAutoInject' then
frm.show()
end
end
[DISABLE]
The Problem is that this Method gives me the "Lua Script Edit" Form.
So any helpfull suggestions are welcome.
Thanks in advance.
local aa = getMemoryViewForm().getComponent(279)
aa.doClick()
AAWindow = 'TfrmAutoInject'
function getFormByClass(n)
if n == '' then return nil end
for i = 0, getFormCount() - 1 do
local frm = getForm(i)
if frm.ClassName == n then
return frm
end
end
end
local f = getFormByClass(AAWindow)
local script = f.getComponent(60)
script.Lines.Text = [[
{
Game : My Random Game
Author : LeFiXER
Date : 21/10/22
More Stuff
}
[ENABLE]
// blah blah blah
[DISABLE]
]]
First of all thanks for your reply.
Got some questions
Where did index 279 and 60 come from ? CESource on GitHub ?
aa.doClick() should open a Form i guess but it gives me a access violation. It opens an "Service Descriptor Table" with no functionality
local aa = getMemoryViewForm().getComponent(279) <<<<<< where did you get the Index from ?
aa.doClick() <<<<<<< gives me an access violation
AAWindow = 'TfrmAutoInject'
function getFormByClass(n)
if n == '' then return nil end
for i = 0, getFormCount() - 1 do
local frm = getForm(i)
if frm.ClassName == n then
return frm
end
end
end
local f = getFormByClass(AAWindow)
local script = f.getComponent(60) <<<<<<<< here and below wont run