Sign in to follow this  
Followers 0
Notta112

Q; about memory

7 posts in this topic

So i found out how to read and write memeory, but now i just can't fidure out how to do this.

$Mem_Address = 0x158E4044 
$Process1 = WinGetProcess("Our FPS.exe")

While 1
        $Mem_Open = _MemoryOpen($Process1) 
        $Mem_Read = _MemoryRead($Mem_Address, $Mem_Open) 
            if ($Mem_Read < 1000) Then ;tried "1000" too but nothing.
            send("{F3}")
            sleep(2000)
            _MemoryClose($Mem_Open) 
            Endif
Wend

What i tried to do is that program reads value of memory and when memory value will go smaller than 1000 it would send keystroke. Until now i didnt have any luck, i have figured out different things when i started learning AutoIt. Im sure some of you will find mistake >_<.

Thank You for help.

Share this post


Link to post
Share on other sites



Is exe name correct (task manager)?

#include < NomadMemory.au3 >
$Mem_Open = _MemoryOpen ( ProcessExists ( "Our FPS.exe" ) ) 
While 1
    ToolTip ( _MemoryRead ( 0x158E4044 , $Mem_Open ) , 0 , 0 )
    Sleep ( 200 )
Wend
_MemoryClose ( $Mem_Open )

what value do tooltip return from above script?

Look one more time in cheat engine do you have correct adress?


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Now im realy confused. I forgot to change window name to Rose Online [Ver. 241] I changed it to that and got address value 0. Then i saw that CE showed TRose.exe, i put that in and i got value something 1503477 but in CE it showes my health value 1777.

Is it right that i take pointer 158E4044 and put 0x in front of that so it would be 0x158E4044?

#include <NomadMemory.au3> ;because you need this for _memread functions
WinGetProcess("TRose.exe")


$Mem_Address = 0x158E4044 
$Process1 = WinGetProcess("TRose.exe") ;the window to get PID

While 1
        $Mem_Open = _MemoryOpen($Process1) ;must open before you can read address
        $Mem_Read = _MemoryRead($Mem_Address, $Mem_Open) ;reads value at memory address
            if ($Mem_Read < 1000) Then
            send("{F3}")
            sleep(2000)
            _MemoryClose($Mem_Open) ;close it afterwards
            Endif
Wend

This is my full code at the moment.

Edited by Notta112

Share this post


Link to post
Share on other sites

I know its not 24 yet 24 h-s so sorry.

I looked address over and over again and all seemed right. It was 2 byte address. But bogQ code gave me wrong results and my code did absolutely nothing.

If you guys have any more ideas...

Thanks.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

WinGetProcess() is to get the process ID from a window handle/title/class etc. To get a process ID from process image name use ProcessExists().

Edit: By the way, use the way bogQ showed you. Opening a process without closing it inside a loop that doesn't even have a sleep is a bad idea. All you need to do is to open it once and read the memory address inside the loop and closing the process handle when you're done using it. Consider adding a sleep call.

Edited by Authenticity

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Sure it's for reading memorys value? Or im missing something realy stupid thing. Or i cant find addresses via CE. I got only 1 address by scanning all value types which is same as my HP. But to think of it why my HP memory address changes every time i restart the game. Im really confused...

Edit: And i tried using bogQ -s code but it gave me huge value for some reason not the HP value.

Edited by Notta112

Share this post


Link to post
Share on other sites

This is known as a dynamic memory address. It'll get changed almost any time you relaunch the application. To get a static memory address you'll need to find what writes to this address and follow up the pointers chain to get to the static address. Do the CE tutorial file. It's located in the Cheat Engine installation folder and is something you should do...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0