Skilinium Posted April 26, 2007 Share Posted April 26, 2007 I guess someone here has experience with "Cheat engine". My question was, how do i let AutoIt read a "text" value from cheat engine's address list. I dont got any clue on what to do Link to comment Share on other sites More sharing options...
Skilinium Posted April 26, 2007 Author Share Posted April 26, 2007 The address im trying to read is 00740EB8 (text value) Could someone help me? Link to comment Share on other sites More sharing options...
sandman Posted April 27, 2007 Share Posted April 27, 2007 WinGetText() may do the trick, but if it's in a table.. I don't know if that will work. But I would give it a try [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
Skilinium Posted April 27, 2007 Author Share Posted April 27, 2007 Yes, but the thing is, im scanning for a certain text value. Example. Im in town. (Town1.) I get teleported to (Town2.) I want to scann for "Town2." And execute a function once that text piece is found.. my question i dont know how to do that Link to comment Share on other sites More sharing options...
alex OF DEATH Posted April 27, 2007 Share Posted April 27, 2007 Well I know you probably don't want to do this, but AutoIt does have some memory UDF's (somewhere...) which would let you scan/edit memory values, all in the script itself. That's all I can really contribute to this topic. Sorry. Link to comment Share on other sites More sharing options...
Skilinium Posted April 27, 2007 Author Share Posted April 27, 2007 (edited) Well, this is what i have so far.. but it's bugged like hell and i cant solve it #include <Memory.au3> $ProcessID = WinGetProcess("Mythwar - PlayerID 188469") $compare1 = _MemoryRead(0x00740EB8,,char[8]) $Handle = _MemoryOpen($ProcessID) _MemoryClose($Handle) MsgBox(4096, "Returned", "Town = " & $compare1) Edited April 27, 2007 by Skilinium Link to comment Share on other sites More sharing options...
Skilinium Posted April 27, 2007 Author Share Posted April 27, 2007 Anyone ? Link to comment Share on other sites More sharing options...
alex OF DEATH Posted April 27, 2007 Share Posted April 27, 2007 Is "_MemoryRead(0x00740EB8,,char[8]" Supposed to have two commas? Link to comment Share on other sites More sharing options...
Skilinium Posted April 27, 2007 Author Share Posted April 27, 2007 Well, between the comma's is a function that i dont know how to use.. ^^ If anyone would be freely to help me or provide me with a quick sample Link to comment Share on other sites More sharing options...
Zephir Posted April 27, 2007 Share Posted April 27, 2007 what memory func do u include? the one from Nomad? Link to comment Share on other sites More sharing options...
Zephir Posted April 27, 2007 Share Posted April 27, 2007 If so, this would be the code of _MemoryRead(): Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword') If Not IsArray($ah_Handle) Then SetError(1) Return 0 EndIf Local $v_Buffer = DllStructCreate($sv_Type) If @Error Then SetError(@Error + 1) Return 0 EndIf DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '') If Not @Error Then Local $v_Value = DllStructGetData($v_Buffer, 1) Return $v_Value Else SetError(6) Return 0 EndIf EndFuncoÝ÷ Ù«2¢ë{*.綩j¶¦z׫±«¢+ØÀÌØí¥Ù}ÉÍÌ°ÀÌØí¡}!¹±°ÀÌØíÍÙ}QåÁôÌäíݽÉÌä $sv_Type is the type of value you are going to read from Memory --> 'Town2' would be a Sting so char[8] is fine Link to comment Share on other sites More sharing options...
Zephir Posted April 27, 2007 Share Posted April 27, 2007 (edited) Well, this is what i have so far.. but it's bugged like hell and i cant solve it #include <Memory.au3> $ProcessID = WinGetProcess("Mythwar - PlayerID 188469") $compare1 = _MemoryRead(0x00740EB8,,char[8]) $Handle = _MemoryOpen($ProcessID) _MemoryClose($Handle) MsgBox(4096, "Returned", "Town = " & $compare1) You always open the memory FIRST, then you read/write it, then you close it IN THE END! Works like a book To fix your example, try this: #include <Memory.au3> $ProcessID = WinGetProcess("Mythwar - PlayerID 188469") $Handle = _MemoryOpen($ProcessID) $compare1 = _MemoryRead(0x00740EB8,$Handle,char[8]) _MemoryClose($Handle) MsgBox(4096, "Returned", "Town = " & $compare1) What i did: 1. swapped _MemoryOpen and _MemoryRead lines 2. inserted $Handle as second parameter in _MemoryRead() /EDIT: commented, and sorry for starting 3 posts Edited April 27, 2007 by Zephir Link to comment Share on other sites More sharing options...
Skilinium Posted April 27, 2007 Author Share Posted April 27, 2007 Nop, it wont work.. just keep's giving me an error.. even after all the things we discussed trought PM. Link to comment Share on other sites More sharing options...
Zephir Posted April 27, 2007 Share Posted April 27, 2007 Nop, it wont work.. just keep's giving me an error.. even after all the things we discussed trought PM.i found your problem!!! In line 7: put "" around the expression char[8] that sould do it 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