jtuttle
Joined: 06 Nov 2008 Posts: 26
|
Posted: Sun Aug 30, 2009 8:45 am Post subject: Mailinator Notifier |
|
|
Script to check your mailinator inbox and tell you if/how many emails you have.
| Code: | #Persistent
FileInstall, m8r-yes.ico, m8r-yes.ico
FileInstall, m8r-no.ico, m8r-no.ico
Menu, Tray, Tip, M8r notifier: Checking...
Menu, Tray, NoStandard
Menu, Tray, Add, Check, Check
Menu, Tray, Add, Open Mail, OpenMail
Menu, Tray, Add, Exit, Exito
Check:
msg := 0
urldownloadtofile, http://mailinator.com/maildir.jsp?email=ahktest, %a_temp%/m8r
Loop, Read, %A_Temp%/m8r
{
IfInString, A_LoopReadLine, <tr><td colspan=2>No messages for ahktest</td></tr>, Break
IfInString, A_LoopReadLine, <tr><td bgcolor=, EnvAdd, msg, 1
}
FileDelete, %A_Temp%/m8r
if msg = 0
Menu, Tray, Icon, m8r-no.ico
else
Menu, Tray, Icon, m8r-yes.ico
Menu, Tray, Tip, M8r notifier: %msg% messages.
Return
OpenMail:
Run, http://mailinator.com/maildir.jsp?email=ahktest
Return
Exito:
ExitApp |
If you don't want to bother with making icons, you can comment those lines out, obviously. It doesn't need them, they just make it prettier. |
|