Jump to content

Recommended Posts

Posted

So basically, after I "_IEDocReadHTML" of a webpage,

how can I find out how many times "You Win" and "Not You" appear?

I figure I might be able to use StringRegExp by somehow dividing the _IEDocRead up, but I dont know how or what to do.

I have seen other posts that deal with reading from txt documents, but I do not (and cannot) want to create and delete a text file each time this count happens, because it will happen very often.

Any ideas?

Thanks

Posted (edited)

  multiloser said:

Nevermind, something along the lines of this works:

StringReplace($function, 'WIN', '')

MsgBox(0, '', @extended)

This will replace all "WIN" 's with nothing, so I'm guessing this isn't what you need. Perhaps try this:

$stringsplit = StringSplit($string, "WIN", 1)
MsgBox(0,"",$stringsplit[0]-1)

Kurt

Edited by _Kurt

Awaiting Diablo III..

Posted
  Quote

This will replace all "WIN" 's with nothing, so I'm guessing this isn't what you need.

Why? this will not replace anything, this is what he need, because he isn't put the variable at StringReplace, $function will remained untouched, and @extended will return the number of replaces (words that was found(replaced) in the string $function - but the string is not changed).

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...