PHP Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#RequireAdmin
$1234=1
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Metin2 Bypass", 409, 100, 191, 124, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
$Group1 = GUICtrlCreateGroup("Pfad", 8, 8, 393, 49)
$Input1 = GUICtrlCreateInput("", 16, 24, 337, 21)
$Button1 = GUICtrlCreateButton("...", 360, 24, 35, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Run = GUICtrlCreateButton("Bypass", 8, 64, 75, 25, 0)
$Button2 = GUICtrlCreateButton("Kill Torrentpatch", 312, 72, 91, 17, 0)
$Button3 = GUICtrlCreateButton("Patcher", 96, 64, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $1234=1
If FileExists ("config.ini") Then
$iniPfad = IniRead ("config.ini","path","path","")
GUICtrlSetData ($Input1,$iniPfad)
$Ort = $iniPfad
$1234 +=2
Else
$1234 +=2
EndIf
Case $Button1
$Pfad = FileOpenDialog("Metin2client.bin finden","C:\" ,"Metin2 Client Datei (*.bin)" )
GUICtrlSetData($Input1,$Pfad)
Case $Button2
ProcessClose("metin2.bin")
Case $Button3
$string = GUICtrlRead($Input1)
$Path = StringTrimRight($string,16)
Run($Path&"PatchUpdater.exe")
Case $Run
If FileExists ("config.ini") Then
Run($Ort)
Else
$Ort2 = GUICtrlRead($Input1)
Run($Ort2)
IniWrite ("config.ini","path","path",$Ort2)
EndIf
EndSwitch
WEnd