souleke Posted December 21, 2010 Share Posted December 21, 2010 hey I'm trying to find a text in a frame of IE but if thats not true it needs to go on to the next frame and click the button so it go's to the next page clicking the button and so isn't the problem but finding the text in the frame seems to be hard :/ i have used some snippets and stuff i find on the forum here but stil i'm stuck and getting the same error Func Findit() $frame = _IEFrameGetObjByName($oIE, "frm2" ) $sHTML = _IEBodyReadText ($frame) If StringInStr($sHTML, "MEMBER ONLINE" ) Then Return True EndIf EndFunc the error it gives Return SetError($_IEStatus_Success, 0, $o_object.document.body.innerText) Return SetError($_IEStatus_Success, 0, $o_object.document^ ERROR if i remove the "findit" func the script runs fine and keeps doing its work so the problem sits in this func please help i need this because if i change stuf of the site while the member is on, he/she gets booted or i get errors and then i have mutch more to fix (Note: sry for my english but i'm dutch) Link to comment Share on other sites More sharing options...
wakillon Posted December 21, 2010 Share Posted December 21, 2010 Can you post your script, it will be more easy to find the error ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
souleke Posted December 24, 2010 Author Share Posted December 24, 2010 (edited) after 2 days i found it !!! the string had "enter" in it so i had to strip it first first code Func Findit() $frame = _IEFrameGetObjByName($oIE, "frm2" ) $sHTML = _IEBodyReadText ($frame) If StringInStr($sHTML, "MEMBER ONLINE" ) Then Return True EndIf EndFunc the working 1 Func Findit() $frame = _IEFrameGetObjByName($oIE, "frm2" ) $sHTML = _IEBodyReadText ($frame) $var = StringReplace($sHTML, @CRLF, " ") ; strip the string from "enter" If StringInStr($var, "MEMBER ONLINE" ) Then Return True EndIf EndFunc topic solved edit: typo in code Edited December 24, 2010 by souleke 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