Jump to content

Recommended Posts

Posted

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

Posted

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 :shocked:

[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]

Posted

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

Posted

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.

Posted (edited)

Well, this is what i have so far.. but it's bugged like hell and i cant solve it :shocked:

#include <Memory.au3>

$ProcessID = WinGetProcess("Mythwar - PlayerID 188469")

$compare1 = _MemoryRead(0x00740EB8,,char[8])

$Handle = _MemoryOpen($ProcessID)

_MemoryClose($Handle)

MsgBox(4096, "Returned", "Town = " & $compare1)
Edited by Skilinium
Posted

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

Posted (edited)

Well, this is what i have so far.. but it's bugged like hell and i cant solve it :D

#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 by Zephir
Posted

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

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
×
×
  • Create New...