Also es sollte eher so aussehen
vieles bei dir war nicht richtig geordnet bzw stand an der falschen stelle zudem
waren einige befehle falsch oder nicht geeignet
besser wäre es so :
Code:
#include <NomadMemory.au3>
#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Tutorial Fog", 199, 97, 420, 512)
$Button1 = GUICtrlCreateButton("Start", 8, 64, 185, 25, $WS_GROUP)
$Checkbox1 = GUICtrlCreateCheckbox("ON/OFF", 8, 16, 185, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Hack()
Exit
EndSwitch
WEnd
Func _Hack()
ToolTip("Waiting S4",0,0)
$PID = ProcessWait("S4Client.exe")
ToolTip("Good Hack",0,0)
$OPEN = _MEMORYOPEN($PID)
If GUICtrlRead($Checkbox1) = 1 Then
_MEMORYWRITE(0x00D43040,$OPEN,"FogColorR","char[10]")
Exit
Endif
EndFunc
Aber noch besser wäre es sich wenn deine GUI geschlossen wird sobald man Button 1 drückt dafür brauchst du den befehl
GUIsetstate
Um es zu schließen brauchste GUIsetstate (@SWHide)
das ganze sieht dann so aus
Code:
#include <NomadMemory.au3>
#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Tutorial Fog", 199, 97, 420, 512)
$Button1 = GUICtrlCreateButton("Start", 8, 64, 185, 25, $WS_GROUP)
$Checkbox1 = GUICtrlCreateCheckbox("ON/OFF", 8, 16, 185, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Hack()
Exit
EndSwitch
WEnd
Func _Hack()
[U]GuisetState (@SWHide)[/U]
ToolTip("Waiting S4",0,0)
$PID = ProcessWait("S4Client.exe")
ToolTip("Good Hack",0,0)
$OPEN = _MEMORYOPEN($PID)
If GUICtrlRead($Checkbox1) = 1 Then
_MEMORYWRITE(0x00D43040,$OPEN,"FogColorR","char[10]")
Exit
Endif
EndFunc