Jump to content

Recommended Posts

Posted

Hi, i am trying to make a autoit program that checks if a user is online on a website and if so, makes a msgbox appear.

Here is the code so far: 

#include <IE.au3>
#include <MsgBoxConstants.au3>
$oIE = _IECreate("http://computernewb.com/collab-vm/",0,1)
$txt = _IEBodyReadText($oIE)
Sleep(9000)
If StringInStr($txt,"username") then
Msgbox(0, "", "Text detected")
EndIf

It does not seem to work properly and i do not really know why. 

Could someone help?

Posted
  On 2/26/2016 at 5:45 PM, matty45 said:

Hi, i am trying to make a autoit program that checks if a user is online on a website and if so, makes a msgbox appear.

Here is the code so far: 

#include <IE.au3>
#include <MsgBoxConstants.au3>
$oIE = _IECreate("http://computernewb.com/collab-vm/",0,1)
$txt = _IEBodyReadText($oIE)
Sleep(9000)
If StringInStr($txt,"username") then
Msgbox(0, "", "Text detected")
EndIf

It does not seem to work properly and i do not really know why. 

Could someone help?

Expand  
#include <IE.au3>
#include <MsgBoxConstants.au3>
$oIE = _IECreate("http://computernewb.com/collab-vm/",0,1)
$HWND = _IEPropertyGet($oIE, "hwnd")
    WinSetState($HWND, "", @SW_MAXIMIZE)

Local $divs = _IETagNameGetCollection($oIE, "div")

For $div In $divs
    If $div.id = "online-users" Then
        Local $text = $div.innerText

         If StringInStr($text, "FluffyVulpix") Then
             MsgBox(0, "","This user is online")
         EndIf
    EndIf
Next

There you go ..!!

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...