anyday Posted April 20, 2006 Share Posted April 20, 2006 im trying to make a script that will read the contents of an email that i have open, once i double click on the email it opens the email in its own window. Well i attached the code ive got so far but it doesnt seem to work. i used autoitwindow info to get the ClassNameNN: for the text i needed but the $var is empty. any ideas? WinActivate ("emailtitle", "") $var = ControlGetText("emailtitle", "", "renctl_tabbar1") Msgbox (4096, "Test", $var) Link to comment Share on other sites More sharing options...
anyday Posted April 20, 2006 Author Share Posted April 20, 2006 (edited) ok i think i answered my own question, using WinGetText worksanother question though once i have the $var full of the email whats the best way to pull out an address?lets say the email as a address like thislocated at the following address: 2329 blah st new york, ny 89383i need to be able to pull all of the address part and put it into a var. Edited April 20, 2006 by anyday Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 20, 2006 Moderators Share Posted April 20, 2006 (edited) ok i think i answered my own question, using WinGetText worksanother question though once i have the $var full of the email whats the best way to pull out an address?lets say the email as a address like thisi need to be able to pull all of the address part and put it into a var.Do you only plan on doing this when the email is open?If not cameronsdad posted an example on here to maybe get you started. I'll look for it.Edit:Here are some links to look at.http://www.autoitscript.com/forum/index.ph...ook.Applicationhttp://www.autoitscript.com/forum/index.ph...ook.Applicationhttp://www.autoitscript.com/forum/index.ph...ook.Applicationhttp://www.autoitscript.com/forum/index.ph...ook.Application Edited April 20, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
anyday Posted April 21, 2006 Author Share Posted April 21, 2006 yes while the email is open, now i just trying to figure out the best way to get the address out of the $var, the format is located at the following address: address here i need to get the address into a $variable but the problem is the address is not always on the same line number, i tried saving the email to a file and use file read line but like i said the line # varies. Link to comment Share on other sites More sharing options...
LKRaider Posted April 21, 2006 Share Posted April 21, 2006 (edited) Do a string search. Like, use the file read line, and if the line contains the string (ex. "Address"), save the whole line. Problem is if the address spans to more lines... also, you may get false-positives this way (the string "address" appearing somewhere else on the message). Best if you could define start and ending strings (ex: Start=[address]xyxy[/address]), then you could get "xyxy", but I'm guessing you can't do that Edited April 21, 2006 by LKRaider Link to comment Share on other sites More sharing options...
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