AutoIT [HELP]Leggere il Valore di un Pointer con AutoIt

ZaoldieckITA

Utente Gold
31 Agosto 2012
514
37
132
269
Spero di aver postato nella sezione giusta!

Ciao a tutti, sto imparando a leggere la memoria e ad usare il cheat engine.

Ora spiegherò il mio problema.

Ho trovato il Pointer per il valore che mi interessa, non posso usare gli address perche cambiano ogni volta invece in questo modo (con cheat engine) riesce a leggere ogni volta il valore che mi interessa.

uChCeFf.png


FIN QUI TUTTO BENE.

Ora quello che vorrei fare e' riuscire a leggere questo valore... Con Autoit!

questo e' il mio codice attuale:

Codice:
#RequireAdmin

Opt("WinTitleMatchMode", 4)
WinActivate("ClassName=Florensia")
Global $ProcessID = WinGetProcess("ClassName=Florensia","")
If $ProcessID = -1 Then
    MsgBox(4096, "ERROR", "Failed to detect process.")
    Exit
EndIf

$currenthp = Current_HP ()

Func Current_HP ()
   Local $DllInformation = _MemoryOpen($ProcessID)
   If @Error Then
      MsgBox(4096, "ERROR", "Failed to open memory.")
      Exit
   EndIf
   Local $Value, $Pointer_1
   Local $Offset1 = 60
   Local $Offset2 = 10
   local $Handle = _MemoryOpen($ProcessID)
   local $Address = 0x10D18950
   Local $base = 0x007BA63C
   $Value = _MemoryRead($base + $Address, $DllInformation)
   If @Error Then
      MsgBox(4096, "ERROR", "Failed to read memory.")
      Exit
   EndIf
   $Pointer_1 = '0x' & hex($Value + $Offset1 + $Offset2)
   $Value = _MemoryRead($Pointer_1, $DllInformation)
   _MemoryClose($DllInformation)
   If @Error Then
      MsgBox(4096, "ERROR", "Failed to close memory.")
      Exit
   EndIf
   Return $Value
EndFunc

MsgBox(0,"",$currenthp) ; <=== should be 3447 but it return 0

Come valore mi ritorna un bel ZERO quando invece dovrebbe dire 3447 ci sto diventando matto e non capisco cosa sbaglio.

questa e' l'include che ho utilizzato per le funzioni sulla Memoria di Nomad:

Codice:
;#include-once
#region _Memory
;=================================================================================================
; AutoIt Version:    3.1.127 (beta)
; Language:            English
; Platform:            All Windows
; Author:            Nomad
; Requirements:        These functions will only work with beta.
;=================================================================================================
; Credits:    wOuter - These functions are based on his original _Mem() functions.  But they are
;            easier to comprehend and more reliable.  These functions are in no way a direct copy
;            of his functions.  His functions only provided a foundation from which these evolved.
;=================================================================================================
;
; Functions:
;
;=================================================================================================
; Function:            _MemoryOpen($iv_Pid[, $iv_DesiredAccess[, $iv_InheritHandle]])
; Description:        Opens a process and enables all possible access rights to the process.  The
;                    Process ID of the process is used to specify which process to open.  You must
;                    call this function before calling _MemoryClose(), _MemoryRead(), or _MemoryWrite().
; Parameter(s):        $iv_Pid - The Process ID of the program you want to open.
;                    $iv_DesiredAccess - (optional) Set to 0x1F0FFF by default, which enables all
;                                        possible access rights to the process specified by the
;                                        Process ID.
;                    $if_InheritHandle - (optional) If this value is TRUE, all processes created by
;                                        this process will inherit the access handle.  Set to TRUE
;                                        (1) by default.  Set to 0 if you want it to be FALSE.
; Requirement(s):    A valid process ID.
; Return Value(s):     On Success - Returns an array containing the Dll handle and an open handle to
;                                 the specified process.
;                    On Failure - Returns 0
;                 @ErRoR - 0 = No error.
;                             1 = Invalid $iv_Pid.
;                             2 = Failed to open Kernel32.dll.
;                             3 = Failed to open the specified process.
; Author(s):        Nomad
; Note(s):
;=================================================================================================
Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $if_InheritHandle = 1)

    If Not ProcessExists($iv_Pid) Then
        SetError(1)
        Return 0
    EndIf

    Local $ah_Handle[2] = [DllOpen('kernel32.dll')]

    If @Error Then
        SetError(2)
        Return 0
    EndIf

    Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $if_InheritHandle, 'int', $iv_Pid)

    If @Error Then
        DllClose($ah_Handle[0])
        SetError(3)
        Return 0
    EndIf

    $ah_Handle[1] = $av_OpenProcess[0]

    Return $ah_Handle

EndFunc

;=================================================================================================
; Function:            _MemoryRead($iv_Address, $ah_Handle[, $sv_Type])
; Description:        Reads the value located in the memory address specified.
; Parameter(s):        $iv_Address - The memory address you want to read from. It must be in hex
;                                  format (0x00000000).
;                    $ah_Handle - An array containing the Dll handle and the handle of the open
;                                 process as returned by _MemoryOpen().
;                    $sv_Type - (optional) The "Type" of value you intend to read.  This is set to
;                                'dword'(32bit(4byte) signed integer) by default.  See the help file
;                                for DllStructCreate for all types.
;                                An example: If you want to read a word that is 15 characters in
;                                length, you would use 'char[16]'.
; Requirement(s):    The $ah_Handle returned from _MemoryOpen.
; Return Value(s):    On Success - Returns the value located at the specified address.
;                    On Failure - Returns 0
;                 @ErRoR - 0 = No error.
;                             1 = Invalid $ah_Handle.
;                             2 = $sv_Type was not a string.
;                             3 = $sv_Type is an unknown data type.
;                             4 = Failed to allocate the memory needed for the DllStructure.
;                             5 = Error allocating memory for $sv_Type.
;                             6 = Failed to read from the specified process.
; Author(s):        Nomad
; Note(s):            Values returned are in Decimal format, unless specified as a 'char' type, then
;                    they are returned in ASCII format.  Also note that size ('char[size]') for all
;                    'char' types should be 1 greater than the actual size.
;=================================================================================================
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

EndFunc

;=================================================================================================
; Function:            _MemoryWrite($iv_Address, $ah_Handle, $v_Data[, $sv_Type])
; Description:        Writes data to the specified memory address.
; Parameter(s):        $iv_Address - The memory address you want to write to.  It must be in hex
;                                  format (0x00000000).
;                    $ah_Handle - An array containing the Dll handle and the handle of the open
;                                 process as returned by _MemoryOpen().
;                    $v_Data - The data to be written.
;                    $sv_Type - (optional) The "Type" of value you intend to write.  This is set to
;                                'dword'(32bit(4byte) signed integer) by default.  See the help file
;                                for DllStructCreate for all types.
;                                An example: If you want to write a word that is 15 characters in
;                                length, you would use 'char[16]'.
; Requirement(s):    The $ah_Handle returned from _MemoryOpen.
; Return Value(s):    On Success - Returns 1
;                    On Failure - Returns 0
;                 @ErRoR - 0 = No error.
;                             1 = Invalid $ah_Handle.
;                             2 = $sv_Type was not a string.
;                             3 = $sv_Type is an unknown data type.
;                             4 = Failed to allocate the memory needed for the DllStructure.
;                             5 = Error allocating memory for $sv_Type.
;                             6 = $v_Data is not in the proper format to be used with the "Type"
;                                 selected for $sv_Type, or it is out of range.
;                             7 = Failed to write to the specified process.
; Author(s):        Nomad
; Note(s):            Values sent must be in Decimal format, unless specified as a 'char' type, then
;                    they must be in ASCII format.  Also note that size ('char[size]') for all
;                    'char' types should be 1 greater than the actual size.
;=================================================================================================
Func _MemoryWrite($iv_Address, $ah_Handle, $v_Data, $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
    Else
        DllStructSetData($v_Buffer, 1, $v_Data)
        If @Error Then
            SetError(6)
            Return 0
        EndIf
    EndIf

    DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    If Not @Error Then
        Return 1
    Else
        SetError(7)
        Return 0
    EndIf

EndFunc

;=================================================================================================
; Function:            _MemoryClose($ah_Handle)
; Description:        Closes the process handle opened by using _MemoryOpen().
; Parameter(s):        $ah_Handle - An array containing the Dll handle and the handle of the open
;                                 process as returned by _MemoryOpen().
; Requirement(s):    The $ah_Handle returned from _MemoryOpen.
; Return Value(s):    On Success - Returns 1
;                    On Failure - Returns 0
;                 @ErRoR - 0 = No error.
;                             1 = Invalid $ah_Handle.
;                             2 = Unable to close the process handle.
; Author(s):        Nomad
; Note(s):
;=================================================================================================
Func _MemoryClose($ah_Handle)

    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf

    DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
    If Not @Error Then
        DllClose($ah_Handle[0])
        Return 1
    Else
        DllClose($ah_Handle[0])
        SetError(2)
        Return 0
    EndIf

EndFunc

;=================================================================================================
; Function:            _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset[, $sv_Type])
; Description:        Reads a chain of pointers and returns an array containing the destination
;                    address and the data at the address.
; Parameter(s):        $iv_Address - The static memory address you want to start at. It must be in
;                                  hex format (0x00000000).
;                    $ah_Handle - An array containing the Dll handle and the handle of the open
;                                 process as returned by _MemoryOpen().
;                    $av_Offset - An array of offsets for the pointers.  Each pointer must have an
;                                 offset.  If there is no offset for a pointer, enter 0 for that
;                                 array dimension.
;                    $sv_Type - (optional) The "Type" of data you intend to read at the destination
;                                 address.  This is set to 'dword'(32bit(4byte) signed integer) by
;                                 default.  See the help file for DllStructCreate for all types.
; Requirement(s):    The $ah_Handle returned from _MemoryOpen.
; Return Value(s):    On Success - Returns an array containing the destination address and the value
;                                 located at the address.
;                    On Failure - Returns 0
;                 @ErRoR - 0 = No error.
;                             1 = $av_Offset is not an array.
;                             2 = Invalid $ah_Handle.
;                             3 = $sv_Type is not a string.
;                             4 = $sv_Type is an unknown data type.
;                             5 = Failed to allocate the memory needed for the DllStructure.
;                             6 = Error allocating memory for $sv_Type.
;                             7 = Failed to read from the specified process.
; Author(s):        Nomad
; Note(s):            Values returned are in Decimal format, unless a 'char' type is selected.
;                    Set $av_Offset like this:
;                    $av_Offset[0] = NULL (not used)
;                    $av_Offset[1] = Offset for pointer 1 (all offsets must be in Decimal)
;                    $av_Offset[2] = Offset for pointer 2
;                    etc...
;                    (The number of array dimensions determines the number of pointers)
;=================================================================================================
Func _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset, $sv_Type = 'dword')

    If IsArray($av_Offset) Then
        If IsArray($ah_Handle) Then
            Local $iv_PointerCount = UBound($av_Offset) - 1
        Else
            SetError(2)
            Return 0
        EndIf
    Else
        SetError(1)
        Return 0
    EndIf

    Local $iv_Data[2], $i
    Local $v_Buffer = DllStructCreate('dword')

    For $i = 0 to $iv_PointerCount

        If $i = $iv_PointerCount Then
            $v_Buffer = DllStructCreate($sv_Type)
            If @Error Then
                SetError  @ErRoR + 2)
                Return 0
            EndIf

            $iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
            DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
            If @Error Then
                SetError(7)
                Return 0
            EndIf

            $iv_Data[1] = DllStructGetData($v_Buffer, 1)

        ElseIf $i = 0 Then
            DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
            If @Error Then
                SetError(7)
                Return 0
            EndIf

            $iv_Data[1] = DllStructGetData($v_Buffer, 1)

        Else
            $iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
            DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
            If @Error Then
                SetError(7)
                Return 0
            EndIf

            $iv_Data[1] = DllStructGetData($v_Buffer, 1)

        EndIf

    Next

    $iv_Data[0] = $iv_Address

    Return $iv_Data

EndFunc

;=================================================================================================
; Function:            _MemoryPointerWrite ($iv_Address, $ah_Handle, $av_Offset, $v_Data[, $sv_Type])
; Description:        Reads a chain of pointers and writes the data to the destination address.
; Parameter(s):        $iv_Address - The static memory address you want to start at. It must be in
;                                  hex format (0x00000000).
;                    $ah_Handle - An array containing the Dll handle and the handle of the open
;                                 process as returned by _MemoryOpen().
;                    $av_Offset - An array of offsets for the pointers.  Each pointer must have an
;                                 offset.  If there is no offset for a pointer, enter 0 for that
;                                 array dimension.
;                    $v_Data - The data to be written.
;                    $sv_Type - (optional) The "Type" of data you intend to write at the destination
;                                 address.  This is set to 'dword'(32bit(4byte) signed integer) by
;                                 default.  See the help file for DllStructCreate for all types.
; Requirement(s):    The $ah_Handle returned from _MemoryOpen.
; Return Value(s):    On Success - Returns the destination address.
;                    On Failure - Returns 0.
;                 @ErRoR - 0 = No error.
;                             1 = $av_Offset is not an array.
;                             2 = Invalid $ah_Handle.
;                             3 = Failed to read from the specified process.
;                             4 = $sv_Type is not a string.
;                             5 = $sv_Type is an unknown data type.
;                             6 = Failed to allocate the memory needed for the DllStructure.
;                             7 = Error allocating memory for $sv_Type.
;                             8 = $v_Data is not in the proper format to be used with the
;                                 "Type" selected for $sv_Type, or it is out of range.
;                             9 = Failed to write to the specified process.
; Author(s):        Nomad
; Note(s):            Data written is in Decimal format, unless a 'char' type is selected.
;                    Set $av_Offset like this:
;                    $av_Offset[0] = NULL (not used, doesn't matter what's entered)
;                    $av_Offset[1] = Offset for pointer 1 (all offsets must be in Decimal)
;                    $av_Offset[2] = Offset for pointer 2
;                    etc...
;                    (The number of array dimensions determines the number of pointers)
;=================================================================================================
Func _MemoryPointerWrite ($iv_Address, $ah_Handle, $av_Offset, $v_Data, $sv_Type = 'dword')

    If IsArray($av_Offset) Then
        If IsArray($ah_Handle) Then
            Local $iv_PointerCount = UBound($av_Offset) - 1
        Else
            SetError(2)
            Return 0
        EndIf
    Else
        SetError(1)
        Return 0
    EndIf

    Local $iv_StructData, $i
    Local $v_Buffer = DllStructCreate('dword')

    For $i = 0 to $iv_PointerCount
        If $i = $iv_PointerCount Then
            $v_Buffer = DllStructCreate($sv_Type)
            If @Error Then
                SetError [MENTION=299637]ErRoR + 3)
                Return 0
            EndIf

            DllStructSetData($v_Buffer, 1, $v_Data)
            If @Error Then
                SetError(8)
                Return 0
            EndIf

            $iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
            DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
            If @Error Then
                SetError(9)
                Return 0
            Else
                Return $iv_Address
            EndIf
        ElseIf $i = 0 Then
            DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
            If @Error Then
                SetError(3)
                Return 0
            EndIf

            $iv_StructData = DllStructGetData($v_Buffer, 1)

        Else
            $iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
            DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
            If @Error Then
                SetError(3)
                Return 0
            EndIf

            $iv_StructData = DllStructGetData($v_Buffer, 1)

        EndIf
    Next

EndFunc
#endregion

C'è sicuramente qualcosa che non va nel mio codice, ma mancando di esperienza non riesco a risolvere il problema.

1RlkL7E.png



La mia domanda e il motivo di questo post infatti è..
Come posso leggere il valore del puntatore con Autoit? Dove sto sbagliando? qualcuno può aiutarmi? :rulz:
 
Farlo in AutoIT rende tutto piu' complicato non essendo adatto a fare queste cose. Comunque le funzioni _MemoryPointerRead e _MemoryRead ritornano 0 per diversi motivi, e' probabile che la lettura sia fallita e dovresti controllare che errore e' stato settato con SetError.
Oltretutto dovresti ottenere la base con funzioni come EnumProcessModulesEx e GetModuleInformation invece che metterla hardcoded, altrimenti se l'exe utilizza l'ASLR potrebbe cambiare ad ogni esecuzione.
 
quale linguaggio e' piu adatto alla lettura di valori in memoria? e scusa l'ignoranza ma che cos'e' l'ASLR?

Qualunque linguaggio che supporti i puntatori nativamente e' la scelta migliore, ce ne sono molti i piu' utilizzati sono C e C++. E' possibile anche con C# anche se la gestione dei puntatori resta managed. In piu' con C o C++ hai gia' l'SDK di windows con i file header con tutte le firme delle API che ti servono (OpenProcess, ReadProcessMemory ecc) quindi ti basta chiamarle senza aggiungere altro codice o wrapper.

L'ASLR e' un meccanismo di sicurezza che e' stato adottato per ostacolare exploit che si basano su indirizzi di memoria statici, non e' il tuo caso ma impatta anche su quello che vuoi fare in quanto randomizza anche il base address all'apertura del programma.
 
Ultima modifica:
quello che sto facendo e' realizzare un bot per un gioco. anzi.. a dire il vero l'ho gia fatto, con autoit appunto. quando volevo realizzare il mio primo bot ho cercato tra i linguaggi piu adatti ed e' per questo motivo che mi sono gettato molto su autoit.

Autoit mi e' piaciuto molto, davvero molto. non ho trovato molte difficolta'

Il problema del mio bot e' che, il gioco in questione deve stare in sovrimpressione e non posso minimizzarlo.

scoprendo piu a fondo autoit ho imparato ad utilizzare funzioni come ControlSend e ControlClick che mi hanno consentito di poter minimizzare i bot piu semplici, ma volendo rendere sempre piu intelligente il mio programma, ho cercato di fare in modo che reagisca con intelligenza appunto (e non a caso)

i miei primi bot si basavano principalmente sulle tempistiche e basta(del tipo, cambia target dopo tot secondi), poi sono passato con l'analisi dei pixel sullo schermo per "capire le cose" e far reagire il bot a sua volta. infatti il programma a cui stavo lavorando ora si basava sulla lettura dei pixel in parti precise della barra vita per capire se ero vivo/se ero morto/se avevo piu o meno meta vita.

sono anche perfettamente consapevole che lavorare con i Pixel e' uno dei metodi piu spartani e peggiori che esista ma non conoscendone di migliori ho potuto fare solo questo.

Inoltre lavorare sui pixel mi impedisce di poter minimizzare il mio gioco e questo ha nullificato le funzioni ControlSend e ControlClick che avevo imparato ad usare, cosi ho iniziato a vedere come leggere i dati in memoria con cheat engine. Ora che ho imparato (piu o meno) quest'ultima cosa, non mi restava altro da fare che dare in pasto questi dati al mio bot

ecco il motivo di questo topic

e con AutoIt sto trovando difficolta.

Stavo pensando di passare ad un linguaggio "migliore" o meglio... "piu adatto" ma non vorrei fare il passo piu lungo della gamba. Onestamente sono un po spaventato all'idea di passare ad un altro linguaggio e dover in qualche modo "ricominciare" da zero, non sono nemmeno un programmatore infatti sono un autodidatta che impara le cose piano piano su internet essendone molto appassionato.

Creare questo bot mi sta divertendo molto di piu di giocare a quel gioco, ho realizzato che la programmazione in generale mi sta piacendo molto. Quando riesco a fare le cose ho una soddisfazione assurda e mi sento davvero realizzato.

Quindi credo che provero a dare un occhiata ad un linguaggio che mi consenta di leggere "facilmente" i dati da un pointer.

Come prima cosa cerchero di convertire il mio attuale programma nel nuovo linguaggio.

me ne hai nominato piu di uno dandomi qualche informazione ma adesso e' uno che devo scegliere.

ora che conosci un pochino meglio la mia situazione.. quale linguaggio mi consiglieresti?
C, C++ oppure C#?

anzi con C# potrei avere lo stesso problema di autoit, quindi C o C++?
Messaggio unito automaticamente:

Farlo in AutoIT rende tutto piu' complicato non essendo adatto a fare queste cose. Comunque le funzioni _MemoryPointerRead e _MemoryRead ritornano 0 per diversi motivi, e' probabile che la lettura sia fallita e dovresti controllare che errore e' stato settato con SetError.
Oltretutto dovresti ottenere la base con funzioni come EnumProcessModulesEx e GetModuleInformation invece che metterla hardcoded, altrimenti se l'exe utilizza l'ASLR potrebbe cambiare ad ogni esecuzione.
GRAZIE, graziegraziegraziegrazie! sbagliavo proprio tutto, non consideravo il base address! qua su inforge ho trovato una guida di SpeedJack con tanto di video, e' un po datata ma ha spiegato bene delle cose che non avevo proprio capito sul funzionamento degli Address, baseaddress e offset

ho riprovato a scrivere il codice ed eccolo qua! bello e funzionante! e con AutoIt!!
Grazie mille davvero! e grazie anche a @SpeedJack per le sue guide che ho trovato! Utilissime!

jifmBK7.jpeg


Ecco il codice per la lettura del Pointer:
Codice:
Global $PID = ProcessExists ("FlorensiaEn.bin")
Global $Open = _MemoryOpen ($PID)
Global $Close = _MemoryClose ($Open)

Global $Base = _MemoryModuleGetBaseAddress ($PID,"FlorensiaEn.bin") + 0x007BA63C
Global $Offset[3]
$Offset[0] = 0
$Offset[1] = 0x60
$Offset[2] = 0x10

$Open = _MemoryOpen ($PID)
$Read = _MemoryPointerRead ($Base, $Open, $Offset)
MsgBox (0,"",$Read[1]) ;==> current hp florensia
$Close = _MEmoryClose ($Open)

ad ogni modo credo che mi avvicinero cmq al C++ sembra un linguaggio davvero difficile ma assolutamente COMPLETO quindi da quel che ho capito, masterare quest'ultimo significherebbe poter fare Qualsiasi cosa. grazie a tutti!
 
Mi fa piacere che hai risolto, mi rendo conto che ricominciare puo' far paura per questo ti ho suggerito anche il modo per poter continuare con AutoIT. Pero' appunto i bot con autoit sono perfetti per inviare tasti/click a tempo o con hotkey ma non operare sulla memoria, anzi sono sorpreso che hai fatto prima anche un analisi sui pixel.
Per il futuro diciamo il prossimo bot, con C++ puoi fare qualunque cosa, anche se piu' "complesso" da anche piu' soddisfazione.