#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, "Check") Global $sFile = @ScriptDir & "\test.txt" Global $FaFileOpen = FileOpen(@ScriptDir & "\test.txt", 0) ;Global $FaFileRead = FileReadLine($FaFileOpen, 1) GUISetState() While 1 Sleep(20000) WEnd Func Check() $readinputfa = GUICtrlRead($inputfa) GUICtrlSetState($checkfa, $GUI_HIDE) Global $loadingfa = GUICtrlCreateButton("Loading", 1070, 59, 95, 30) Dim $text If Not _FileReadToArray($sFile, $text) Then MsgBox(4096, "Error", " Error reading text file to Array error:" & @error) Exit EndIf _ArrayDisplay($text, "Debug: $text") ; Split lines into 2D array Dim $avIPs[$text[0] + 1][2] = [["col1", "col2"]] ;MsgBox(0,"","" & $text[0] ) For $x = 1 To $text[0] $array = StringSplit($text[$x], "=") If $array[0] = 2 Then $avIPs[$x][0] = $array[1] $avIPs[$x][1] = $array[2] EndIf If $readinputfa = $avIPs[$x][0] Then GUICtrlSetData($statusfa,"Valid!") GUICtrlSetColor(-1, 0x00FF00) ; Green; GUICtrlSetFont(-1, 12, 700) ; Bold GUICtrlSetData($fadescription,$avIPs[$x][1]) GUICtrlSetState($loadingfa, $GUI_HIDE) GUICtrlSetState($checkfa, $GUI_SHOW) EndIf Next _ArrayDisplay($avIPs, "Debug: $avIPs") EndFunc Func _Exit() Exit FileClose($FaFileOpen) EndFunc ;==>_Exit