Jump to content
Sign in to follow this  
abcomp01

When run script is waiting computer hang

Recommended Posts

abcomp01

Opt("TCPTimeout", 1)

#include <GUIConstants.au3>

#include <GUIListView.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()

$socket = TCPConnect(TCPNameToIP($ip), 5121 )

If $socket <> -1 Then

_GUICtrlListViewSetItemText($ListView1, $listsel, 1, " Online")

Else

_GUICtrlListViewSetItemText($ListView1, $listsel, 1, " Offline")

EndIf

TCPShutdown ()

EndFunc

Func Checkchar($ip,$listsel)

_GUICtrlListViewSetItemText($ListView1, $listsel, 2, " Checking")

TCPStartUp()

$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()

$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

Share this post


Link to post
Share on other sites
abcomp01

---Rim.txt---

Xpvp.no-ip.info

61.47.61.111

Orange-clubza.no-ip.biz

zoommy.no-ip.info

pvp24online.no-ip.info

enkore.no-ip.info

58.9.91.3

bossandnut.no-ip.info

58.9.203.219

www.google.com

Share this post


Link to post
Share on other sites
abcomp01

---Rim.txt---

Xpvp.no-ip.info

61.47.61.111

Orange-clubza.no-ip.biz

zoommy.no-ip.info

pvp24online.no-ip.info

enkore.no-ip.info

58.9.91.3

bossandnut.no-ip.info

58.9.203.219

www.google.com

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×