View previous topic :: View next topic |
Author |
Message |
empirebattles How do I cheat? Reputation: 0
Joined: 13 May 2009 Posts: 7
|
Posted: Sun Sep 16, 2012 5:34 pm Post subject: Reading/writing Text Boxes |
|
|
I'm still playin around with cheat engine's trainer maker.
Right now, i've gotten buttons, check boxes, etc etc to work correctly.
However, for some reason, edit boxes (input) is not playing nice.
I know that they are not Cheat Components (therefor i cannot use things like cheatcomponent_getEditValue).
If my understanding is correct, i have to use control_getCaption in order to retrieve the contents of the edit box.
However, all of my attempts at this are failing.
Right now, i have an input box (TCEEdit), that i have named TEST. (In the objects inspector, it is shown as TEST: TCEEdit)
I also have a button, that has a function when it is clicked, that is supposed to get the boxes contents, and simply return them in a message (just confirming the data was gotten correctly).
Code: |
mf=getMainForm()
d_mess=control_getCaption(component_findComponentByName(mf,TEST))
showMessage(d_mess) |
When i have that code, and i press the button, it gives me an Access violation.
A few things i'm shaky on:
First, is the getMainForm()... I know i'm supposed to use a component in component_findComponentByName, but i'm not sure the parent/component of my input box :/
If i dont even put a component in the arguments, it doesn't produce the desired results(blank).
I can upload my basic trainer if needed... but i'm thinking this is easy, and my brain has decided to trick me.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun Sep 16, 2012 6:18 pm Post subject: |
|
|
Component names are accessed by using Formname_Componentname
So if your TEST object is on a form named UDF1, then you'd access it by UDF1_TEST
so: control_getCaption(UDF1_TEST)
gatMainForm() should not be used unless you wish to access a control on the main ce window
_________________
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 |
|
|
empirebattles How do I cheat? Reputation: 0
Joined: 13 May 2009 Posts: 7
|
Posted: Sun Sep 16, 2012 6:44 pm Post subject: |
|
|
Ah... i was wondering how to find out what the name of the form was. I took a guess, and took the name that was next to the "Form Designer"... and it worked!
Sometimes the simplest things misdirect my thoughts
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Sat Sep 22, 2012 4:12 pm Post subject: |
|
|
Is it possible to do memscan from what is written in CEEdit?
I don't really know how to do it, I have read the main.lua, but still didn't found anything useful to do so.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sat Sep 22, 2012 5:20 pm Post subject: |
|
|
yes, get the caption of the CEEdit and memscan for that
_________________
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 |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Sun Sep 23, 2012 8:48 am Post subject: |
|
|
So I wrote this
Code: | input1 = control_getCaption( UDF1_CEEdit1 );
mems = createMemScan(true)
fl = createFoundList(ms)
function CEButton1Click(sender)
memscan_firstScan(mems , soExactValue, vtDword, rtRounded, input1, nil, 0, 0x2fffffff, "+X-C-W", fsmAligned, "4", false, false, false, false)
memscan_waitTillDone(mems)
foundlist_initialize(fl)
showMessage("Scan is complete")
control_setVisible(UDF1_CEButton2, true)
control_setVisible(UDF1_CEEdit2, true)
end
|
But I get Access violation.
Can you help me out?
And also, how do I make the memscan results be changed with X value? (sorry I never used it before and googling it didn't help me)
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun Sep 23, 2012 10:26 am Post subject: |
|
|
createMemScan takes as parameter a progressbar object or nothing. so instead of (true) do ()
and instead of using input1 in firstScan use control_getCaption( UDF1_CEEdit1 )
_________________
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 |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Sun Sep 23, 2012 12:38 pm Post subject: |
|
|
Alright I don't get errors when press excute,
so I ineserted this one
Code: | mems = createMemScan()
fl = createFoundList(mems)
function CEButton1Click(sender)
memscan_firstScan(mems , soExactValue, vtDword, rtRounded, control_getCaption(UDF1_CEEdit1 ), nil, 0, 0x2fffffff, "+X-C-W", fsmAligned, "4", false, false, false, false)
memscan_waitTillDone(mems)
foundlist_initialize(fl)
showMessage("Scan is complete")
control_setVisible(UDF1_CEButton2, true)
control_setVisible(UDF1_CEEdit2, true)
end |
But when I enter for example 25 in the box, I get this
Code: | Error:Failure determining what 805306367 means |
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun Sep 23, 2012 1:43 pm Post subject: |
|
|
Instead of 0x2fffffff try "2fffffff"
And instead of nil for second input do ""
(Is this ce 6.2?)
_________________
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 |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Sun Sep 23, 2012 3:58 pm Post subject: |
|
|
says
Code: | [string "mems = createMemScan()..."]:5: malformed number near '2fffffff' |
When entering the
Code: | mems = createMemScan()
fl = createFoundList(mems)
function CEButton1Click(sender)
memscan_firstScan(mems , soExactValue, vtDword, rtRounded, control_getCaption(UDF1_CEEdit1 ), "", 0, 2fffffff, "+X-C-W", fsmAligned, "4", false, false, false, false)
memscan_waitTillDone(mems)
foundlist_initialize(fl)
showMessage("Scan is complete")
control_setVisible(UDF1_CEButton2, true)
control_setVisible(UDF1_CEEdit2, true)
end |
I tried 0x2ffff again, but gives same error again.
And yes I use CE 6.2
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun Sep 23, 2012 4:06 pm Post subject: |
|
|
no, not 2fffffff but "2fffffff" (with the quotes)
_________________
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 |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Sun Sep 23, 2012 4:09 pm Post subject: |
|
|
Worked!, showd the message.
But now how do I do change the value of the adresses?.
Next scan I believe is like the same as first scan...
P.S
And I donated you 5$ (sorry I don't make alot.. D
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun Sep 23, 2012 4:50 pm Post subject: |
|
|
You can use foundlist_getCount and foundlist_getAddress to walk through the addresslist (0=first item)
you can then use writeInteger/writeFloat/writeDouble/writeBytes with that address to change it
_________________
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 |
|
|
|