Sign in to follow this  
Followers 0
Saytun

How to filter the text stored in a variable?

4 posts in this topic

Ok, so I am making a very simple program which opens up a website, enters in a number, and records the website's response in a text file.

I am using the '_IEBodyReadText' function to get the info on the page, but I only need a small portion of the text and not the whole thing. Currently I am storing the body text to the variable $sText, which ends up looking something like this after the program is ran:

LoginMylist -0Help

*THIS IS THE DATA I WANT TO KEEP RIGHT HERE*

Search

MyAccount

Home

and it goes on and on for quite a while. Everything on the page is consistent, except for the data that I want to keep, so is there a good way to filter out everything except that data and store it to a new variable?

Thanks a lot for the help, I've been searching through the help file for a while but I'm a novice.

Share this post


Link to post
Share on other sites



Use string* functions. StringRegExp, _StringBetween, and StringSplit are my favorites. If you provide source, I (or someone) could probably retrieve the needed data.

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

Thank you, _StringBetween was exactly what I needed. My script is working amazingly well, thanks for the help.

<3 AutoIt, saves me tens of hours of otherwise manual work.

Share this post


Link to post
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
Sign in to follow this  
Followers 0