Jump to content

Recommended Posts

Posted

I have searched the forums, and cannot find something that will do what I need. I suspect I'm missing something somewhere...

I play a web based game that uses a standard map with coordinates and several different terrains. I am trying to make a program that will help me to keep track of what terrain is at a location and where players are.

So far, I have successfully logged in using IE.au3 and can navigate around the game fairly well. However, I am having trouble parsing out the information I need from the web pages...

I have pulled the HTML body of a web page using _IEBodyReadHTML ($oIE), which returns the entire web page.

Since the page I am loading has several different versions (depending on terrain or player base), I need to determine which version of the page I'm at before - however they can move around depending on the content of the page.

How can a search for a word in the string and get it's location, so that I can pull out the information after it.

For example:

</td>
</tr>

<tr>
<td bgcolor="#FEE990" style="border: 1px solid #008EFF">

Strength: 2<br>
Fortification: 3<br>
Stealth: 3<br>
Security: 0<br>
<br>
Oil: 8272<br>
Cash: A 4.5<br>
<br>
Driller: 3<br>
Digger: 3<br>
<br>
Islands: 0<br>
Sharks: 1<br>
Thieves: 2

</td>

I would need to search the string for each of these stats, then pull the number out after the stat.

Any help would be greatly appreciated.

Posted

Thanks SmOke_N, the link you posted lead me to the StringRegEXP tutorial, which I think is putting me on the right track.

How about look in the helpfile under

"StringInStr"

Paulie - The StringInStr does not give the position of the text you are looking for, it just tells you if it's there. Since I wanted to get the location and terrain type out of the page - using StringInStr would not work as it does not allow for extraction of data.

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