Sign in to follow this  
Followers 0
Tinutron

How to get this in a Do/Until-Loop?

3 posts in this topic

#1 ·  Posted (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% :party: Would be nice if you could let this script return an example in a messagebox or something :idea: thanks again for all the help, i allready love this community. :P

#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 by Tinutron

Share this post


Link to post
Share on other sites



Ok, i'm allready able to loop it, but can i let the pointer return be shown in percentages?

Share this post


Link to post
Share on other sites

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%

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