Tinutron Posted May 22, 2009 Share Posted May 22, 2009 (edited) Hello! I'm currently using this code but i have to confess, that i dont really understand it. I would like to loop this, until the pointer returns 0, how can i do it? And my next question is, how can i let that what the pointer returns be shown in percentages? There is a range from 0 to 731, 731 should be 100% 0 should be 0% Would be nice if you could let this script return an example in a messagebox or something thanks again for all the help, i allready love this community. #include <winapi.au3> Global Const $PROCESS_VM_OPERATION = (0x0008) Global Const $PROCESS_VM_READ = (0x0010) Global $Process="programm.exe" Global $Pointer = 0x13E49640 $handle=_WinAPI_OpenProcess(BitOR($PROCESS_VM_OPERATION,$PROCESS_VM_READ),False,ProcessExists($Process)) $s=DllStructCreate("int") Local $read _WinAPI_ReadProcessMemory($handle,$Pointer,DllStructGetPtr($s),DllStructGetSize($s),$read) MsGbox(0,"Read value",DllStructGetData($s,1)) _WinAPI_CloseHandle($handle) Edited May 22, 2009 by Tinutron Link to comment Share on other sites More sharing options...
Tinutron Posted May 23, 2009 Author Share Posted May 23, 2009 Ok, i'm allready able to loop it, but can i let the pointer return be shown in percentages? Link to comment Share on other sites More sharing options...
schoel Posted May 23, 2009 Share Posted May 23, 2009 If you get a value between 0 and 731, just divide the returned number by 731 and you have the percentage. E.g. 731 / 731 = 1 = 100%, 0 / 731 = 0 = 0% Link to comment Share on other sites More sharing options...
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