Jump to content

Help needed.


Recommended Posts

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]

Link to comment
Share on other sites

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

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
Link to comment
Share on other sites

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

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...