Saytun Posted April 25, 2007 Posted April 25, 2007 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*SearchMyAccountHomeand 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.
Zedna Posted April 25, 2007 Posted April 25, 2007 If you have constant text before and after your text then use _StringBetween() See helpfile/forum for details and examples... Resources UDF ResourcesEx UDF AutoIt Forum Search
_Kurt Posted April 25, 2007 Posted April 25, 2007 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..
Saytun Posted April 25, 2007 Author Posted April 25, 2007 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.
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