a little dialog edit box help plz

Ask for Help on Using the Language With Memory Hacking Software

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

a little dialog edit box help plz

Postby liqmysaq » Mon Jan 12, 2009 1:05 am

im making a trainer and ive figured out most of the stuff on my own, but im stumped on this last thing. im putting a speed hack in that has a checkbox and an edit box. i cant figure out how to take the value from the edit box and poke it when the checkbox is checked. going off of the dialog example from the help file it says
Code: Select all
VOID EditProc( HWND hOwner, HWND hEdit ) {
    // Get the whole line of text and print it.
    INT iLength = GetWindowTextLength( hEdit ) + 1;
    CHAR * pcText = Malloc( iLength );
    GetWindowText( hEdit, pcText, iLength );
    PrintF( "Text changed to “%s”.", pcText );
    Free( pcText );         // Free your resources!
}
now i should only have to change PrintF to something like SetWindowText or something right? so far all attempts have giving me errors and i cant figure out how to give the value a name so in the function part of the checkbox i can put like playerSpeed = editBoxText where editBoxText would be the value you put into the edit box.
User avatar
liqmysaq
I Know Your Poop
 
Posts: 538
Joined: Tue Jan 01, 2008 2:02 am

Postby liqmysaq » Tue Jan 20, 2009 8:07 am

ok im still stuck on this... i have managed to get the value to change when the checkbox is clicked depending whats in the text box. only problem is that the value poked into the address is not whats in the text box. am i correct in thinking that pcText holds the value from the text box? so if i wrote
Code: Select all
VOID SpeedBox( HWND hOwner, HWND hSpeed ) {

   INT iLength = GetWindowTextLength( hSpeed ) + 1;
    CHAR * pcText = Malloc( iLength );
    GetWindowText( hSpeed, pcText, iLength );
    PrintF( "Text changed to “%s”.", pcText );
    speedValue = pcText;
    //Free( pcText );
}
it would save whats in the text box into speedValue? this is what i have done and it does put something to the address value i specify but its nothing close to what i put in the text box. say i put 45 into the text box, then when i look at the address in MHS the value is like 4574324. yet the PrintF() prints out the correct value in the script editor.. why is this happening?
User avatar
liqmysaq
I Know Your Poop
 
Posts: 538
Joined: Tue Jan 01, 2008 2:02 am


Return to Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron