Jump to content

detect status of online webpages


The_Noob
 Share

Recommended Posts

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
Link to comment
Share on other sites

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.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...