Walls192 0 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? Share this post Link to post Share on other sites
John 5 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. Share this post Link to post Share on other sites
BillLuvsU 8 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 Share this post Link to post Share on other sites
Walls192 0 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? Share this post Link to post Share on other sites