Nez Posted January 12, 2009 Share Posted January 12, 2009 First off I'd like to state that I did attempt to search the forums with the forum search tool as well as Google and have come up empty handed. If I failed to catch something obvious, I do apologize. Here is the scenario: I have to pull up information in IE 7. Basically I log into a network device via this web tool, which in turn will display the signals of the device in set columns/rows. The columns/rows are the same for every device. If a device does not report a specific signal level, the column data will simply be left blank. I have to record these signals, and when you deal with as many as I do in a day, even a simple copy/paste gets too annoying. I was hoping to get autoit to read the data from the memory in IE and to save it to a variable. I am, to say the least, a novice at reading memory. My first instinct to learn how was to install and use Axe 3. I pulled a network device in IE like I normally do, and all the signals levels are displayed as they should be. I had Axe pull the process for IE and even found the signal levels and the offset they are in, however there is a problem: the offset is never the same. For every refresh the offset changes. Here is an example: Signal located at Offset 0365AF14 Refreshed IE, signals are exact same Signal is now located at Offset 03593322 Can anyone explain why? Is there an easier way to go about this? My thanks in advance. Link to comment Share on other sites More sharing options...
FireFox Posted January 12, 2009 Share Posted January 12, 2009 @nez Youve searched on forum ? Use NomadMemory.au3 Cheers, FireFox. Link to comment Share on other sites More sharing options...
TheFluffyOne Posted January 12, 2009 Share Posted January 12, 2009 Would it be practical for you just to download the web page directly into your script? Or possibly even just save the page out to an HTML file and read that into your script? Reading memory from another process seems a rather unusual way to achieve this. Link to comment Share on other sites More sharing options...
Nez Posted January 12, 2009 Author Share Posted January 12, 2009 @nezYouve searched on forum ? Use NomadMemory.au3Cheers, FireFox.Yes I am aware of NomadMemory, however, correct me if I am wrong, but nomad makes reading memory easy, it seems you just plug in the offset for it to read from, which leads back to my original issue of the offset seeming to change every refresh.Would it be practical for you just to download the web page directly into your script? Or possibly even just save the page out to an HTML file and read that into your script?Reading memory from another process seems a rather unusual way to achieve this.I had considered those options, however the speed of the process is important. I figured reading from memory would be the fastest way to obtain the information I need. Link to comment Share on other sites More sharing options...
Fend Posted January 12, 2009 Share Posted January 12, 2009 Since the location of your value is constantly changing you nee to find a static address to refferene off of. This is commonly used when writting cheats or bots for games. I would use a program like cheat engine to find the value you are looking for. At that point, use pointer scan for addess or whatever it is phrased as. This will give you something like 0x435678+whatever.exe then you could use something like...#include <NomadMemory.au3>$ID = _MemoryOpen(ProcessExists("XYZ.exe"));;gets the process ID$baseADDR = _MemoryGetBaseAddress($ID, 1);;gets the base address after finding the ID$StaticOffset = Dec("37fc78");;the offset for the green address $CalcADDR = "0x" & Hex($baseADDR + $StaticOffset)$value = _MemoryRead($HPADDR,$ID);;the valueNow, if you are unable to find the value in cheatengine then you will have to follow back the pointers to a static value...there are instruction/tutorials on the internet and I would not be able to explain it in a post. After tracking back the pointers use something like this....$ID = _MemoryOpen(ProcessExists("XYZ.exe"));;gets the process ID$baseADDR = _MemoryGetBaseAddress($ID, 1);;gets the base address after finding the ID$StaticOffset = Dec("37fc78");;the offset for the green address $CharHPPtrOffset = "0xAC";;2nd level pointer offset$CharHPOffset = "0x4C";;1st level pointer offset$CalcADDR = "0x" & Hex($baseADDR + $StaticOffset);;2nd level pointer$value = "0x" & Hex(_MemoryRead($CalcADDR,$ID));;calc to find 1st level pointer$CalcADDR = "0x" & Hex($value + $CharHPPtrOffset);;1st level pointer$value = "0x" & Hex(_MemoryRead($CalcADDR,$ID));;calc to find address of value$HPADDR = "0x" & Hex($value + $CharHPOffset);;address of value$HP = _MemoryRead($HPADDR,$ID);;the valueThis code finds the value of hitpoints in a games memory, but its function is essentially what your are doing. It deals with a pointer to a pointer to a static address.You will have to use Szhlopp's _MemoryGetBaseAddress which you can find at this posthttp://www.autoitscript.com/forum/index.ph...ic=78834&hlAnd Nomad's Memory library which you can find by searching the forumns...NomadMemory.au3 I like cookies? Link to comment Share on other sites More sharing options...
Nez Posted January 12, 2009 Author Share Posted January 12, 2009 Since the location of your value is constantly changing you nee to find a static address to refferene off of. This is commonly used when writting cheats or bots for games. I would use a program like cheat engine to find the value you are looking for. At that point, use pointer scan for addess or whatever it is phrased as. This will give you something like 0x435678+whatever.exe then you could use something like...#include <NomadMemory.au3>$ID = _MemoryOpen(ProcessExists("XYZ.exe"));;gets the process ID$baseADDR = _MemoryGetBaseAddress($ID, 1);;gets the base address after finding the ID$StaticOffset = Dec("37fc78");;the offset for the green address $CalcADDR = "0x" & Hex($baseADDR + $StaticOffset)$value = _MemoryRead($HPADDR,$ID);;the valueNow, if you are unable to find the value in cheatengine then you will have to follow back the pointers to a static value...there are instruction/tutorials on the internet and I would not be able to explain it in a post. After tracking back the pointers use something like this....$ID = _MemoryOpen(ProcessExists("XYZ.exe"));;gets the process ID$baseADDR = _MemoryGetBaseAddress($ID, 1);;gets the base address after finding the ID$StaticOffset = Dec("37fc78");;the offset for the green address $CharHPPtrOffset = "0xAC";;2nd level pointer offset$CharHPOffset = "0x4C";;1st level pointer offset$CalcADDR = "0x" & Hex($baseADDR + $StaticOffset);;2nd level pointer$value = "0x" & Hex(_MemoryRead($CalcADDR,$ID));;calc to find 1st level pointer$CalcADDR = "0x" & Hex($value + $CharHPPtrOffset);;1st level pointer$value = "0x" & Hex(_MemoryRead($CalcADDR,$ID));;calc to find address of value$HPADDR = "0x" & Hex($value + $CharHPOffset);;address of value$HP = _MemoryRead($HPADDR,$ID);;the valueThis code finds the value of hitpoints in a games memory, but its function is essentially what your are doing. It deals with a pointer to a pointer to a static address.You will have to use Szhlopp's _MemoryGetBaseAddress which you can find at this posthttp://www.autoitscript.com/forum/index.ph...ic=78834&hlAnd Nomad's Memory library which you can find by searching the forumns...NomadMemory.au3Looks like my computer here at work won't allow me to install Cheat Engine so I'll give that a try tonight. Thanks for the help I think that may just be the info I needed! 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