Skip to content

Instantly share code, notes, and snippets.

@noahcoad
Created February 13, 2013 19:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save noahcoad/4947434 to your computer and use it in GitHub Desktop.
Save noahcoad/4947434 to your computer and use it in GitHub Desktop.
3 handy global hotkeys for composing email
; update as needed
chrome := userprofile "\Local Settings\Application Data\Google\Chrome\Application\chrome.exe"
iexplorer := "C:\Program Files (x86)\Internet Explorer\iexplore.exe"
; Open Gmail Inbox
#^e:: OpenChromeUrl("http://mail.google.com/mail")
; Compose Gamil Email
#^c:: OpenChromeUrl("https://mail.google.com/mail/?view=cm&fs=1&tf=1")
; Compose Email to Noah
#^n:: OpenChromeUrl("https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=%22Noah%20Coad%22%20%3Cnoah@coad.net%3E")
; Opens a link in Google Chrome if possible
OpenChromeUrl(url)
{
global chrome
if (FileExist(chrome))
Run %chrome% %url%
else
OpenIExplorerUrl(url)
}
; Opens a link in Internet Explorer
OpenIExplorerUrl(url)
{
global iexplorer
Run %iexplorer% %url%
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment