Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a hotkey combination that opens up my browser and logs me into Gmail if I'm not already logged in. Does someone have a script for this?

share|improve this question
Use Lastpass to keep you logged in anyway?!? The only reason I could think of wanting this is on a public machine and then you don't have AutoHotKey... – Ivo Flipse Dec 22 '09 at 7:54
Oh and the script would have to contain your password, so if anyone else would get their hands on your .ahk script, you're screwed :-) However I like the idea of scripting these kind of things! – Ivo Flipse Dec 22 '09 at 7:57
well keeping myself logged in all the time is unsafe as sometimes i have to leave my laptop unattended...but automating the login with a non-standard hotkey configuration (AHK) would prevent anyone besides me from accessing my account – eqzx Dec 22 '09 at 8:25
up vote 1 down vote accepted

I don't have a perfect solution, so anyone who feels like editing my answer go ahead.

But someone on Just an asterisk posted a AutoHotKey script to send a gmail from the command line.

I posted the script below and it requires your username and password in a seperate .txt file. On another site they gave the tip to put this file in an encrypted folder, so nobody can find out what your password is (unless you leave your computer unlocked).

;send gmail from the command line with CLgmail.exe by Just an Asterisk
filereadline, username, %A_ScriptDir%\logon.txt, 1
filereadline, password, %A_ScriptDir%\logon.txt, 2
server =
port = 587
Gui, Add, Edit, vRec x6 y7 w420 h20, To?
Gui, Add, Edit, vSubject x6 y37 w420 h20,
Gui, Add, Edit, r9 vBodyText x6 y67 w420 h250, Message
Gui, Add, Button, x6 y327 w200 h20 gSendMail default, Send
Gui, Add, Button, x226 y327 w200 h20 gGUIhide, Cancel

    Gui, Show, x131 y91 h357 w435, Send a quick note

    gui, Submit 
    string =  %username%_%password%_%server%_%port%_%rec%_%subject%_%bodytext%
    Run %A_ScriptDir%\CLgmail.exe %string%, ,Min

    Gui, Hide

Now I need someone who can actually code to alter the script from launching a command line, to launching the browser and filling in the blanks there! Hope this helps you a bit.

Edit: I also found a little script/program someone created, but it's not made for AutoHotKey. Check it out on

It uses to fill in the forms.

 'this will parse the form and add your inputs
 � web.document.Forms(0).email.Value = "" + Text2.Text
 � web.document.Forms(0).passwd.Value = "" + Text3.Text
 � web.document.Forms(0).submit
End Sub
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .