Caer12 Posted August 8, 2007 Share Posted August 8, 2007 I need to repeat 2 processes in the script so that they basically refresh the program window and updates everything, I need to know how I could go about doing that.When I open the program the first time:When I open it the second time:I need to know how I can make it basically refresh automatically every 5 seconds or some way that I don't have to manually run the program each time I want to check on something.Any help with this is greatly appreciated.expandcollapse popup#include <GUIConstants.au3> #include <INet.au3> #include <String.au3> #include <array.au3> ;GUI GUICreate("Qonquer Server Status",301,109) GUICtrlSetBkColor(-1,000000) Opt("GUICoordMode",2) ;SERVER STATUS $widthCell=36 GUICtrlSetColor(-1,0xff00) ;SEARCH FOR TEXT AND POSTS CASE Dim $avCodes[1] = ["GIF89"] $src1 = _INetGetSource('http://www.qonquer.com/status/status.php?link=127.0.0.1:9958') $trm1 = StringTrimLeft($src1, 0) $trm3 = StringTrimRight($trm1, 49) For $i = 0 To UBound($avCodes) - 1 $Input = $avCodes[$i] $Pos = _ArraySearch ($trm3, $Input) Select Case $Pos = -1 GUICtrlCreatePic ("online.bmp",12,38,36,18) Case Else GUICtrlCreatePic ("offline.bmp",-1,0,36,18) EndSelect Next ;PLAYERS ONLINE $src = _INetGetSource('http://69.41.179.98:9980/online.js') $trm = StringTrimLeft($src, 17) $trm2 = StringTrimRight($trm, 4) GUICtrlCreateLabel ($trm2, -1, 33, $widthCell) GUISetState () ;BACKGROUND IMAGE $background = GUICtrlCreatePic ("qbackground.bmp", -47, -105, 304, 109) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Link to comment Share on other sites More sharing options...
rambo3889 Posted August 8, 2007 Share Posted August 8, 2007 This should do it: expandcollapse popup#include <GUIConstants.au3> #include <INet.au3> #include <String.au3> #include <array.au3> ;GUI GUICreate("Qonquer Server Status", 301, 109) GUICtrlSetBkColor(-1, 000000) Opt("GUICoordMode", 2) AdlibEnable("SetPlayers", 5000) ;SERVER STATUS $widthCell = 36 GUICtrlSetColor(-1, 0xff00) ;SEARCH FOR TEXT AND POSTS CASE Dim $avCodes[1] = ["GIF89"] $src1 = _INetGetSource('http://www.qonquer.com/status/status.php?link=127.0.0.1:9958') $trm1 = StringTrimLeft($src1, 0) $trm3 = StringTrimRight($trm1, 49) For $i = 0 To UBound($avCodes) - 1 $Input = $avCodes[$i] $Pos = _ArraySearch($trm3, $Input) Select Case $Pos = -1 GUICtrlCreatePic("online.bmp", 12, 38, 36, 18) Case Else GUICtrlCreatePic("offline.bmp", -1, 0, 36, 18) EndSelect Next ;PLAYERS ONLINE $label = GUICtrlCreateLabel(Getplayers(), -1, 33, $widthCell) GUISetState() ;BACKGROUND IMAGE $background = GUICtrlCreatePic("qbackground.bmp", -47, -105, 304, 109) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Func Getplayers() $src = _INetGetSource('http://69.41.179.98:9980/online.js') $trm = StringTrimLeft($src, 17) $trm2 = StringTrimRight($trm, 4) Return $trm2 EndFunc ;==>Getplayers Func SetPlayers () GUICtrlSetData($label, Getplayers()) EndFunc ;==>SetPlayers My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! 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