Change Process memory

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
fedek
Posts: 60
Joined: 17 May 2016, 12:17
Contact:

Change Process memory

29 Aug 2016, 12:27

Help me please, I need a function, which will change process memony as you see. For example, i have an adress 000043942098. Shoud i tranlate it to hexadecimal number system?
vasili111
Posts: 747
Joined: 21 Jan 2014, 02:04
Location: Georgia

Re: Change Process memory

29 Aug 2016, 12:36

There is a good library made by RHCP for interacting with memory. It has read nad change functions too. Look here: https://autohotkey.com/boards/viewtopic ... 77&p=67167
DRAKON-AutoHotkey: Visual programming for AutoHotkey.
fedek
Posts: 60
Joined: 17 May 2016, 12:17
Contact:

Re: Change Process memory

30 Aug 2016, 06:07

I think thats not what i need.I need functions like in programs Artmoney or CheatEngine. I need something like this

WriteProcessMemory(title,addresse,wert,size)
{
VarSetCapacity(idvar,32,0)
VarSetCapacity(processhandle,32,0)
VarSetCapacity(value, 32, 0)
NumPut(wert,value,0,Uint)
address=%addresse%
WinGet ,idvar,PID,%title%
processhandle:=DllCall("OpenProcess","Uint",0x38,"int",0,"int",idvar)
Bvar:=DllCall("WriteProcessMemory","Uint",processhandle,"Uint",address+0,"Uint",&value,"Uint",size,"Uint",0)
}

But i dont know what addresse to write if i write 000043942098, 0x43942098, 0x(in hexadecimal number system) - dont works. Or something like this

read(address, type := "UInt", aOffsets*)
{
VarSetCapacity(buffer, bytes := this.aTypeSize[type])
if !DllCall("ReadProcessMemory","UInt", this.hProcess, "UInt", aOffsets.maxIndex() ? this.getAddressFromOffsets(address, aOffsets*) : address, "Ptr", &buffer, "UInt", bytes, "Ptr",0)
return !this.hProcess ? "Handle Is closed: " this.hProcess : "Fail"
return numget(buffer, 0, Type)
}
write(address, value, type := "Uint", aOffsets*)
{
if !bytes := this.aTypeSize[type]
return "Non Supported data type" ; Unsigned64 bit not supported by AHK
VarSetCapacity(buffer, bytes)
NumPut(value, buffer, 0, type)
return DllCall("WriteProcessMemory", "UInt", this.hProcess, "UInt", aOffsets.maxIndex() ? this.getAddressFromOffsets(address, aOffsets*) : address, "Ptr", &buffer, "Uint", bytes, "Ptr", 0)
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: DataLife, ShatterCoder and 210 guests