Walls192 Posted September 17, 2007 Share Posted September 17, 2007 Basically I am quite new to Autoit and after I made a couple of simple programmes I decided to make a Email checker. This is My script so far #Include <Constants.au3> #Include <IE.au3> #NoTrayIcon Opt("TrayMenuMode",1) TrayCreateItem("") $loginitem = TrayCreateItem("Login") TrayCreateItem("") $exititem = TrayCreateItem("Exit") TraySetState() While 1 $msg = TrayGetMsg() Select case $msg = $loginitem $oIE = _IECreate ("http://mail.google.com") send("{ENTER}") $oForm = _IEFormGetObjByName($oIE, "gaia_loginform") $o_login = _IEFormElementGetObjByName ($oForm, "Email") $o_password = _IEFormElementGetObjByName ($oForm, "passwd") _IEFormElementSetValue($o_login, "******") _IEFormElementSetValue($o_password, "*******") _IEFormSubmit ($oForm) If @error Then MsgBox(0, "Error", @error, 5) ElseIf msgbox(0, "Successful", "You have logged in sucessfully", 5) EndIf Case $msg = $exititem Exit EndSelect WEnd Exit Now This just logs into gmail but I am looking for the script to see if you have email? So can any one tell me what to add to check if I have email? Link to comment Share on other sites More sharing options...
John Posted September 17, 2007 Share Posted September 17, 2007 The title contains the number of unread messages. <TITLE>Gmail - Inbox (14)</TITLE> Just retrieve the title, trim to "(" and ")" and compare to the expected value. Link to comment Share on other sites More sharing options...
BillLuvsU Posted September 17, 2007 Share Posted September 17, 2007 A better way to do this would be to use the POP3 functions floating around. Then you could connect, retrieve a list of mail, actually download the mail, and it would probly be simpler then the IE functions. Check em out. =] [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
Walls192 Posted September 18, 2007 Author Share Posted September 18, 2007 A better way to do this would be to use the POP3 functions floating around. Then you could connect, retrieve a list of mail, actually download the mail, and it would probly be simpler then the IE functions. Check em out. =]Please can you give me an example of what you mean, I know how to send mail but how would I receive it? 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