abcomp01 Posted April 11, 2007 Share Posted April 11, 2007 Opt("TCPTimeout", 5) ;sets the connection timeout x ms #include <GUIConstants.au3> #include <GUIListView.au3> #include <Misc.au3> #NoTrayIcon #Region ### START Koda GUI section ### Form=C:\Program Files\AutoIt3\Koda_1.6.0.2\Forms\RIM.kxf $file = FileOpen("Rim.txt", 0) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $RIM = GUICreate("Ragnarok IP Manager", 407, 366, 193, 115) $Group1 = GUICtrlCreateGroup("Ragnarok IP Checker", 2, 5, 401, 289) $ListView1 = GUICtrlCreateListView("Ip name |Login server|Char server|Map server", 8, 24, 386, 262) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Control", 2, 295, 401, 48) $Button1 = GUICtrlCreateButton("&Refresh", 8, 311, 75, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $MenuItem1 = GUICtrlCreateMenu("&Files") $MenuItem5 = GUICtrlCreateMenuItem("&Add", $MenuItem1) $MenuItem6 = GUICtrlCreateMenuItem("", $MenuItem1) $MenuItem3 = GUICtrlCreateMenuItem("&Save", $MenuItem1) $MenuItem6 = GUICtrlCreateMenuItem("", $MenuItem1) $MenuItem7 = GUICtrlCreateMenuItem("&Exit", $MenuItem1) $MenuItem2 = GUICtrlCreateMenu("&Help") $MenuItem4 = GUICtrlCreateMenuItem("&About", $MenuItem2) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop GUICtrlCreateListViewItem($line&"| Unknow"&"| Unknow"&"| Unknow", $ListView1 ) Wend FileClose($file) Func Checklogin($ip,$listsel) _GUICtrlListViewSetItemText($ListView1, $listsel, 1, " Checking") TCPStartUp() Local $socket = TCPConnect(TCPNameToIP($ip), 5121 ) If $socket <> -1 Then _GUICtrlListViewSetItemText($ListView1, $listsel, 1, " Online") Else _GUICtrlListViewSetItemText($ListView1, $listsel, 1, " Offline") EndIf TCPCloseSocket($socket) TCPShutdown () EndFunc Func Checkchar($ip,$listsel) _GUICtrlListViewSetItemText($ListView1, $listsel, 2, " Checking") TCPStartUp() Local $socket = TCPConnect(TCPNameToIP($ip), 6121 ) If $socket <> -1 Then _GUICtrlListViewSetItemText($ListView1, $listsel, 2, " Online") Else _GUICtrlListViewSetItemText($ListView1, $listsel, 2, " Offline") EndIf TCPShutdown () EndFunc Func Checkmap($ip,$listsel) _GUICtrlListViewSetItemText($ListView1, $listsel, 3, " Checking") TCPStartUp() Local $socket = TCPConnect(TCPNameToIP($ip),6900 ) If $socket <> -1 Then _GUICtrlListViewSetItemText($ListView1, $listsel, 3, " Online") Else _GUICtrlListViewSetItemText($ListView1, $listsel, 3, " Offline") EndIf TCPShutdown () EndFunc $i=0 $ret = _GUICtrlListViewGetItemCount($ListView1) While $i < $ret $a_Item = _GUICtrlListViewGetItemTextArray ($ListView1, $i) Checklogin($a_Item[1],$i) Checkchar($a_Item[1],$i) Checkmap($a_Item[1],$i) $i = $i + 1 Wend While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $MenuItem4 Then MsgBox(64, "About", "Ragnarok IP Manager"& @CRLF &"Version: beta1"& @CRLF &"Public: http://"& @CRLF &"By abcomp01" & @CRLF &"Msn: mr_ax@hotmail.com") Wend GUIDelete() Exit Link to comment Share on other sites More sharing options...
Developers Jos Posted April 11, 2007 Developers Share Posted April 11, 2007 I hope you are kidding with the question in the title. Add Opt("TrayIconDebug", 1) at the top and try figure it out yourself so you learn from it ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
therks Posted April 11, 2007 Share Posted April 11, 2007 It works fine for me. Must be a problem with your computer. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now