matty45 Posted February 26, 2016 Posted February 26, 2016 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?
DoomSack Posted March 2, 2016 Posted March 2, 2016 On 26/2/2016 at 11:15 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? #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 ..!!
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