 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 264
|
Posted: Mon Jan 27, 2020 7:46 pm Post subject: Is there a way to open a new AA window with text? |
|
|
I've been working on my mono lua functions more and want to create something that opens a new AutoAssembler window and set the text, or to add something to the templates menu that will change the text Is there an easy way to do that?
Here's what the generated hook looks like FYI:
| Code: | define(hook,"CryingSuns.PlayerStatus:BattleshipState:AddAuxiliarySystems")
define(bytes,55 48 8B EC 56)
[enable]
assert(hook, bytes)
alloc(newmem,$1000, hook)
{
RCX: BattleshipState (this)
RDX: string[] _auxSystemIds
Returns (RAX) System.Void
}
newmem:
// original code
push rbp
mov rbp,rsp
push rsi
jmp hook+5
hook:
jmp newmem
[disable]
hook:
db bytes
dealloc(newmem)
|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Tue Jan 28, 2020 2:19 am Post subject: |
|
|
Next version has a createAutoAssemblerForm, for now you can use:
| Code: |
function createAutoAssemblerForm(text)
getMemoryViewForm().AutoInject1.DoClick()
for i=0,getFormCount()-1 do --this is sorted from z-level. 0 is top
local f=getForm(i)
if getForm(i).ClassName=='TfrmAutoInject' then
f.assemblescreen.Lines.Text=text
return f
end
end
end
|
for the template:
| Code: |
if jgtemplateid then
unregisterAutoAssemblerTemplate(jgtemplateid)
jgtemplateid=nil
end
jgtemplateid=registerAutoAssemblerTemplate("Jgoemat's template", function(script, sender)
--perhaps add in a scan for [enable]/[disable] but just an example so meh. (But if you do, remember that inserting lines will also change the position of enable/disable)
script.add("//!!!!!Code added by JGoemat's template!!!!!");
script.add('define(hook,"CryingSuns.PlayerStatus:BattleshipState:AddAuxiliarySystems")')
script.add('define(bytes,55 48 8B EC 56)')
script.add('Some other stuff, you get the idea...')
--alternatively you could work on the script.Text property as well
script.text=script.text..[[
added by
a multiline addition
yeeeeh
]]
script.insert(0,'this line was added last')
end)
|
_________________
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 |
|
 |
jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 264
|
Posted: Tue Jan 28, 2020 9:30 am Post subject: |
|
|
Awesom, thanks! I’ll try that tonight.
... later ...
Worked like a charm! I posted a link to my github repo with the table and supporting scripts in the extensions forum. |
|
| Back to top |
|
 |
|
|
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
|
|