Jump to content

Recommended Posts

Posted (edited)

Ok theres this site that tells the status of this game i play, and i want to make my GUI show if this server is online or not...

http://quest.weebl.nl/line.php

I want to show on the GUI if the status says offline or online. Any ideas?

Also i seem to be having problems with another bit of code in the GUI...

#include <GUIConstants.au3>
#include <IE.au3> 
Global $Paused


;GUICreate("MoveQuest",1030,791);,-1,-1,$WS_SIZEBOX)

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("program",1024,768);,-1,-1,$WS_SIZEBOX)
$Label1 = GUICtrlCreateLabel("text here", 280, 40, 291, 225)
$Button1 = GUICtrlCreateButton("button!", 600, 48, 161, 49, 0)
$Button2 = GUICtrlCreateButton("Check Server Status", 600, 144, 161, 49, 0);i want to remove this and have it auto update with the status

if ProcessExists ("client.exe") Then
    $label2 = GUICtrlCreateLabel("Client status: Online", 600, 100, 161, 40)
Else
    $label2 = GUICtrlCreateLabel("Client status: Offline", 600, 100, 161, 40)
EndIf

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

the problem is if client.exe exists when the GUI is created, it works, if it doesnt exist, it wont say that its online when the client does exist... so how do i make it update?

Edited by The_Noob
Posted (edited)

don't play the game myself but this might do you for part of it

#include <IE.au3>
$oIE = _IECreate  ("http://quest.weebl.nl/line.php",0,0,1)
$sText = _IEBodyReadText ($oIE)
_IEQuit ($oIE)
$sText = StringSplit($sText,@CRLF,1)
$sText = StringSplit($sText[UBound($sText) - 1],":")
MsgBox(0, $sText[UBound($sText) - 2], StringStripWS($sText[UBound($sText) - 1],8))
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted (edited)

ya i can create the webpage, but i want to avoid it if possable...

Also, how can i make it so it only updates when the status changes without interrupting the rest of the GUI?

Edited by The_Noob

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
×
×
  • Create New...