Fayat Posted February 12, 2006 Posted February 12, 2006 Hi all, here is my problem, i don't know how to retrieve a value in memory. I have the address, but it seems there isn't any function to do that in autoit. Here is my source code in C, it's working but i would make it with autoit : int Check(DWORD dwAddress) { int i,j; DWORD mp[1]; DWORD nb = 0; ReadProcessMemory(hProcess, (LPCVOID) dwAddress, mp, 4, &nb); return (int)mp[0]; } ... perso.hp = Check(0x02C6CB5C); ... With my function Check i retrieve the life value in memory of my game. Thanks for your future help
cdkid Posted February 12, 2006 Posted February 12, 2006 look at w0uters _Mem functions AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
GaryFrost Posted February 12, 2006 Posted February 12, 2006 (edited) haven't tested but something like: Func Check($dwaddress) $lResult = DllCall("kernel32.dll","int","ReadProcessMemory","hwnd",$hprocess,"int",$dwaddress,"int",0,"int",4,"int",0) If Not @error Then If IsArray($lResult) Then If $lResult[0] Then Return $lResult[3] EndIf EndIf SetError(1) Return 0 EndFunc Edited February 12, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now