Hey.
Wo liegt der Fehler?
Danke im Voraus! :handsdown:
Wo liegt der Fehler?
Danke im Voraus! :handsdown:
PHP Code:
;Author
#include "KDMemory.au3"
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Pointer.au3>
#Include <GuiListView.au3>
#include <crypt.au3>
#Include <Timers.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 326, 133, 192, 164)
$Button = GUICtrlCreateButton("On", 128, 56, 97, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $handles = 0
Const $processName = "TClient.exe"
While 1
$msg = GUIGetMsg()
If $msg == -3 Then Exit ; $GUI_EVENT_CLOSE
$processId = ProcessExists($processName)
If $processId == 0 Then
If IsArray($handles) Then
_KDMemory_CloseHandles($handles)
$handles = 0
EndIf
ContinueLoop
EndIf
If $handles == 0 Then
$handles = _KDMemory_OpenProcess($processId)
If @error Then
If MsgBox(52, "Error", "Can't open " & $processName & "! @error: " & @error & @CRLF & "Continue?") == 6 Then
$handles = 0
ContinueLoop
Else
Exit
EndIf
EndIf
EndIf
If $msg = $Button Then
ControlSend ("4Story_GSP","","","i")
EndIf
WEnd