Download&install Messenger Plus! Live and use this script for Gmail:
Gmail Checker
For hotmail, if it is hotmail plus, i.e. if it supports POP3 you can use External E-Mails feature of Messenger Plus! (Go to Preferences window of Messenger Plus! and set necessary settings). If not, just mark the option in Messenger Plus! Preferences window which lets you open multiple Messenger clients and open a new client and signin on that other Messenger with your Windows Live ID and it'll check it instantly.