maestro Posted July 23, 2010 Share Posted July 23, 2010 Hi,I am needing to calculate the following: #include <NomadMemory.au3> $pc = 0.5 $ID = _MemoryOpen(ProcessExists ( "An Application.exe" )) $Address=0x"a working memory address" While 1 $CurrentValue=_MemoryRead($Address,$ID) $percent= ($CurrentValue) * ($pc) ;<------- I want it to do math CurrentValue "times" * 0.5, then If $CurrentValue< $percent Then ; in this line, I want it to have it "Do stuff" but only if it's less then the product of the previous line ;...Do stuff here. EndIf WEnd im not sure what is wrong and would greatly appreciate any help in this matter. Hello, World!... LAME lol Link to comment Share on other sites More sharing options...
JohnOne Posted July 23, 2010 Share Posted July 23, 2010 Code looks fine, whats your problem? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
maestro Posted July 23, 2010 Author Share Posted July 23, 2010 It doesn't seem to work, im not sure at what point its stopping. $pc = 0.5 $ID = _MemoryOpen(ProcessExists ( "An Application.exe" )) $Address=0x"a working memory address" $CurrentValue=_MemoryRead($Address,$ID) $percent= ($CurrentValue) * ($pc) If $CurrentValue< $percent Then <- in this line, when i replace the $percent with a actual value like 1 or 7 or 324543, it works, but it doesn't work with another variable, or the section where its doing the math is messing up, something like that, i need help getting it to flow through properly basically It needs to only run if its 50% of the original value, if there's any easier way of doing that, i would welcome that as well. Hello, World!... LAME lol 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