Jump to content

_memoryWrite()


Recommended Posts

Hi all,

I'm using the UDF Nomadmemory.au3. It works fine for many things but I'm stuck on something. In CheatEngine, I've got this script :

[enable]
00423811:
db 90 90 90 90 90 90
[disable]
00423811:
db 0f 8e ff 00 00 00

I'm trying to do the same thing in Autoit, but every time the game crashes.

Here is a sample of the last thing I've tried :

Func _EnableZoom()
    _Writeit(0x00423811, '0x909090909090', 'uint')
EndFunc

Func _DisableZoom()
    _Writeit(0x00423811, '0x0F8EFF000000', 'uint')
EndFunc

Func _Writeit($offset,$value, $Type = 'dword')
    Local $ProcessID = WinGetProcess($WindowName,"")
    Local $DllInformation = _MemoryOpen($ProcessID)
    If @Error Then
        MsgBox(4096, "ERROR", "Failed to open memory. " & @error)
    EndIf
    _MemoryWrite($offset, $DllInformation,$value,$type)
    If @Error Then
        MsgBox(4096, "ERROR", "Failed to open memory. "& @error)
    EndIf
    _MemoryClose($DllInformation)
    If @Error Then
        MsgBox(4096, "ERROR", "Failed to open memory. " & @error)
    EndIf
EndFunc

Could someone give me a hint ?

Thx in advance.

Link to comment
Share on other sites

I wish I could tell you HOW to do it..

The problem is though is that MemoryWrite, writes a value to that address. It does not write assembly to it.

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...