
Looks like they fixed it.
Code: Select all
; Trainer Library
; Coded by Daniel Middelhede - thefool
Structure tl_freeze
Address.s
Value.l
phandle.l
Size.l
EndStructure
ProcedureDLL tl_Init()
Global Dim tl_tmrlist.tl_freeze(500)
EndProcedure
Procedure.l tl_hex2long(Hex.s)
Erg.l = 0
For i.l = 1 To Len(Hex)
c.l = Asc(Mid(Hex, i, 1))
If c > 64
c - 55
EndIf
If c > 47
c - 48
EndIf
Erg = Erg << 4 + c
Next
ProcedureReturn Erg
EndProcedure
ProcedureDLL tl_GetPhandle(ProcessId) ;Opens process access and gives Handle.
phandle = OpenProcess_(#PROCESS_ALL_ACCESS, #False, ProcessId)
ProcedureReturn phandle
EndProcedure
ProcedureDLL tl_ReadAddress(phandle, Address.s, Size) ;Returns a value from given address
addressLONG.l = tl_hex2long(Address.s)
If ReadProcessMemory_(phandle, addressLONG, @mybuf.l, Size, NULL)
ProcedureReturn mybuf
Else
ProcedureReturn 0
EndIf
EndProcedure
ProcedureDLL.f tl_ReadAddressFLOAT(phandle, Address.s, Size) ;Returns a value from given address
addressLONG.l = tl_hex2long(Address.s)
If ReadProcessMemory_(phandle, addressLONG, @mybuf.f, Size, NULL)
ProcedureReturn mybuf
Else
ProcedureReturn 0
EndIf
EndProcedure
ProcedureDLL tl_WriteAddress(phandle, Address.s, Value,Size) ;Writes a value to memory..
addressLONG = tl_hex2long(Address.s)
result = WriteProcessMemory_(phandle, addressLONG, @Value, Size, NULL)
ProcedureReturn result
EndProcedure
ProcedureDLL tl_ChangeaddressValue(phandle, Address.s, Value,Size) ;Adds or subtracts a value to the address
originalval = tl_ReadAddress(phandle, Address.s, Size)
newval = originalval + Value
val = tl_WriteAddress(phandle,Address.s, newval, Size)
ProcedureReturn val
EndProcedure
ProcedureDLL tl_CloseProcess(phandle) ;Terminates a process
result = TerminateProcess_(phandle, 0)
ProcedureReturn result
EndProcedure
Procedure tl_KeepFreezed()
Repeat
Delay(1000)
i=0
Repeat
phandle = tl_tmrlist(i)\phandle
If phandle > 0
Size = tl_tmrlist(i)\Size
Address.s = tl_tmrlist(i)\Address
oldval = tl_tmrlist(i)\Value
newval = tl_ReadAddress(phandle, Address, Size)
If newval = oldval
;Do nothing..
Else
tl_WriteAddress(phandle,Address,oldval,Size)
EndIf
EndIf
i + 1
Until i = tl_fcount
ForEver
EndProcedure
ProcedureDLL tl_FreezeAddress(phandle,Address.s,Size) ;Freezes a value in an address
Value = tl_ReadAddress(phandle,Address.s,Size)
tl_tmrlist(tl_Place)\Value = Value
tl_tmrlist(tl_Place)\Address = Address.s
tl_tmrlist(tl_Place)\phandle = phandle
tl_tmrlist(tl_Place)\Size = Size
tl_Place + 1
tl_fcount + 1
tl_madef + 1
If tl_fcount > 1
;nothing
Else
tl_tmrhandle = CreateThread(@tl_KeepFreezed(), 0)
EndIf
ProcedureReturn tl_Place
EndProcedure
ProcedureDLL tl_UnFreezeAddress(FreezeNumber) ;Removes a freeze
FreezeNumber - 1
tl_tmrlist(FreezeNumber)\phandle = 0
tl_tmrlist(FreezeNumber)\Address = ""
tl_tmrlist(FreezeNumber)\Value = 0
tl_tmrlist(FreezeNumber)\Size = 0
tl_madef - 1
If tl_madef = 0
KillThread(tl_tmrhandle)
EndIf
EndProcedure
No. He want's to directly read the values of varibales assigned in PureBasic sourcecode.Irene wrote:Are you trying to code a trainer in PureBasic?
Hundreds? Perhaps you need a different coding style, one that uses other data structures to hold information, arrays, structures and lists.DevilDog wrote:Because I'm trying to add this as a feature to my project (PB Project) so I can use it when I program.
I would prefer to have the ability to see the value of a variable by holding my mouse over a variable in the debugger window rather than have to open the debugger scroll through over a hundred variables looking for the one I need.
Devildog