#include #include #include #include #include #include #include #include #include #Include #include #include #include #include #include #include #include #include #include #include Opt("GUIOnEventMode", 1) Global $handleGUI = GUICreate("gui", 1250, 900) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetBkColor(0xFFFFFF) Local $idMenu1 = GUICtrlCreateMenu("Menu") Local $idMenu3 = GUICtrlCreateMenu("About") GUICtrlCreateGroup("Option Checker", 960, 20, 220, 200) GUICtrlSetFont(-1, 11, 500) Global $inputfa = GUICtrlCreateInput("aaa", 970, 59, 85, 28) ;input FA GUICtrlSetFont(-1, 12, 700) Global $statusfa = GUICtrlCreateLabel("", 970, 100, 80, 28) ; Valid GUICtrlSetColor(-1, 0x00FF00) ; Green; GUICtrlSetFont(-1, 12, 700) ; Bold Global $fadescription = GUICtrlCreateLabel("", 970, 120, 300, 38) GUICtrlSetFont(-1, 11, 700) ; Bold ;GUICtrlSetFont(-1, 11, 700) Global $checkfa = GUICtrlCreateButton("Check FA", 1070, 59, 95, 30) GUICtrlSetFont(-1, 11, 500) ;GUICtrlSetOnEvent(-1, "checkfagui") GUICtrlSetOnEvent(-1, "checkfa") Global $FaPath = @ScriptDir & "\test.txt" Global $FaFileOpen = FileOpen(@ScriptDir & "\test.txt", 0) Global $FaFileRead = FileReadLine($FaFileOpen, 1) GUISetState() While 1 Sleep(20000) WEnd Func checkfa() $readinputfa = GUICtrlRead($inputfa) GUICtrlSetState($checkfa, $GUI_HIDE) Global $loadingfa = GUICtrlCreateButton("Loading", 1070, 59, 95, 30) GUICtrlSetFont(-1, 11, 500) If $FaFileOpen = -1 Then MsgBox(0, "File is missing!", "") EndIf $i = 0 For $i = 1 to _FileCountLines($FaFileOpen) Local $line = FileReadLine($FaPath, $i) Local $faoption = StringMid($line, 1, 3) Local $fadescriptionline = StringMid($line, 7, 30) If $readinputfa = $faoption Then GUICtrlSetData($statusfa,"Valid!") GUICtrlSetColor(-1, 0x00FF00) ; Green; GUICtrlSetFont(-1, 12, 700) ; Bold GUICtrlSetData($fadescription,$fadescriptionline) GUICtrlSetState($loadingfa, $GUI_HIDE) GUICtrlSetState($checkfa, $GUI_SHOW) FileClose($FaFileOpen) Exitloop EndIf Next EndFunc Func _Exit() Exit EndFunc ;==>_Exit