Jump to content

StringInStr sometimes fails


Bert
 Share

Recommended Posts

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> &nbsp; <FONT COLOR=red> &nbsp; You must be logged in to use the MyDocuments agent.</FONT><br>
<BR> &nbsp; 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?

Link to comment
Share on other sites

  • Developers

...having fun with Domino http. :D

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

...having fun with Domino http. :D

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