Bert Posted January 16, 2008 Share Posted January 16, 2008 I have a script that doesn't work the same way everytime. I'm doing this: $pagechk1 = _IEDocReadHTML($oIE) $sIs1 = StringInStr($pagechk1,">Log In</A>") The HTML string I'm reading (excerpt) <BR> <FONT COLOR=red> You must be logged in to use the MyDocuments agent.</FONT><br> <BR> Click here to log in: <A HREF="/xxxxxxxxxx.nsf/Report?OpenForm&mydocuments&login">Log In</A><HR> I'm having it read the same page everytime. Most of the time $sIs1 reports a location of ">Log In</A>" . Sometimes it says it can't find the string and reports "0". I can have it read $pagechk1 again, and then it finds it like it should. I'm wondering if the space in the search string is messing it up. Can anyone reproduce it with the data I'm providing? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
weaponx Posted January 16, 2008 Share Posted January 16, 2008 Did you try putting some error control after $pagechk1 = _IEDocReadHTML($oIE)?? Like StringLen() or check for @ERROR??? Link to comment Share on other sites More sharing options...
Developers Jos Posted January 16, 2008 Developers Share Posted January 16, 2008 ...having fun with Domino http. The data you provided is when it fails or is that how it looks when it works ? Would be interested to see the content of $pagechk1 when it fails. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
weaponx Posted January 16, 2008 Share Posted January 16, 2008 Why not just : $sIs1 = StringInStr($pagechk1,"Log In") -or- $sIs1 = StringRegExp($pagechk1,"Log In",0) Link to comment Share on other sites More sharing options...
Bert Posted January 16, 2008 Author Share Posted January 16, 2008 ...having fun with Domino http. The data you provided is when it fails or is that how it looks when it works ?Would be interested to see the content of $pagechk1 when it fails.Good question. I put a msgbox with the $pagechk1 in it to see what was there when it failed. I could see the thing I needed to find, so I'm confused as to why it did not find it. The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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