by Fast 05/10/11, 05:04 pm
^^
^^
เข้ามาดูลิ้ง _Freeze_Value() ขอก๊อปมาให้ดูตรงนี้ละกัน วิธีการทำเขาใส่ While 1 เอาไว้ระหว่างคำสั่งสคริ๊ปเขียนเมมคับ เอามาแก้เขียนเองง่ายกว่านะ เขียนแบบนี้ใส่ sleep ไปด้วยซีพียูจะไม่โดนใช้หนักเกิน
While 1
MemoryWrite("0022F3B4", "zzxx")
sleep(10)
WEnd
;;;;;;;;;;;;;;;สคริ๊ป _Freeze_Value() ;;;;;;;;;;;;;;;;;;;;;;
#include "Nomadmemory.au3"
;===============================================================================
; Function Name: _Freeze_Value()
; Description: Freezes a Value just like Cheat Engine
; Syntax:
; Parameter(s): $Address - Address you want to freesze
; $ID
; An array containing the Dll handle and the handle
; of the open process as returned by _MemoryOpen()
; $Value - Value you want to freeze it at
; $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]' since a 'char' is 8 bits (1 byte) in size.
; Your main While 1 loop in the Script duplicated, put into a function
; Requirement(s): Need #Nomadmemory, Need 2 Main while 1 one reg while one, the other func() EX.
;
;
;while 1 ---------> Main while in script
; $nMsg = GUIGetMsg()
; Switch $nMsg
; Case $GUI_EVENT_CLOSE
; SoundPlay (@HomeDrive& "\Windows\System\t1alarm.wav")
; Exit
;Endswitch
;WEnd
;
;Func While -------->While 1 loop duplicated, into a function (this is the one that = $mainloop, without the ()), (you must have Both)
; $nMsg = GUIGetMsg()
; Switch $nMsg
; Case $GUI_EVENT_CLOSE
; Exit
;EndSwitch
;EndFunc
; Return Value(s): Success = Freezes Value
; Author(s): Liiten \ tri407tiny
; Modification(s):
;===============================================================================
Func _Freeze_Value($ID, $Address, $value, $mainloop)
SetPrivilege("SeDebugPrivilege", 1)
$M1 = _Memoryread($Address)
if $M1 <> $Value then
while 1 ;; ใส่ while เพื่อทำงานคำสั่งซ้ำเดิม
_memorywrite($ID, $address, $Value) ;คำสั่งเขียนเมม
$mainloop ()
WEnd
EndIf
EndFunc