Reduce Keystrokes using AutoHotKey for Windows- Productivity Tip#2 for Geeks

Filed Under: Productivity    3 Comments

 

Free eBook - Linux 101 Hacks. Get your copy now.

AutoHotKey Logo
For geeks to be more productive, using keyboards as much as possible is a must. AutoHotKey for windows is an excellent tool that can automate repetitive typing. Using scripting in AutoHotKey, you can pretty much perform any activities on Windows. This is a jumpstart guide to get you started on the AutoHotKey.

Install and Configure

  1. Download the AutoHotKey and install using the default options.
  2. Launch the AutoHotKey, which will display a dialog confirming that a sample script file will be created.  Click on “Yes” to create the sample AutoHotkey.ahk in the My Documents folder. Later if you want to create a script file under a different directory, from the Windows Explore menu click on File -> New -> AutoHotKey Script.
  3. Make sure AutoHotKey is running in the windows task bar. You can also open the AutHotKey.ahk script by right-mouse click on the AutoHotKey icon from the system tray and select “Edit this script”.
  4. Anytime you make changes to the AutoHotkey.ahk, you need to Reload the script by right-mouse click on the AutoHotKey icon on the system tray and select “Reload this script”.

Basic Usage of AutoHotKey

(1)  Email Signature. Add the following two lines to the AutoHotKey.ahk and reload the script as explained above. For testing, open notepad and type -rn, which will be automatically replaced with the full name “Ramesh Natarajan” as defined in the *.ahk file.  Comments in the AutoHotkey.ahk begins with semi-colon.

; tip#1 - Type long names quickly
::-rn::Ramesh Natarajan

(2) Email Signature with multiple lines. In this example, typing “rtgs” from my email message will add the multiple-line content located within the parenthesis ( ). It is important to choose a keyword that you can easily remember and not common words that could potentially be replaced automatically by mistake.

; tip#2 - My personal email signature with the URL
::rtgs::
(
Ramesh
<a href="http://www.thegeekstuff.com">The Geek Stuff</a>
)

(3) Current Date and Time: When you are taking notes in a textpad, sometimes it may be a good idea to put the current date and time before you start taking notes. In the following example, when you type “ndate” from the notepad, it will add the current date and time in the format mentioned below.


; tip#3 - Adding the timestamp quickly while taking notes
:*:ndate::
FormatTime, CurrentDateTime,, M/d/yyyy h:mm tt  ; It will look like 6/29/2008 10:35 AM
SendInput %CurrentDateTime%
return

(4) Open a website in a browser: Sometime it may be necessary to open your frequently used website with a single key stroke. In the following example, typing “Windows” key + “t” will open the default web browser and launch www.thegeekstuff.com. Please note that “#” in the following line represents the “Windows” key in the keyboard.

; tip#4 - Open frequently used website
#t::Run www.thegeekstuff.com

(5) Open frequently used folder by pressing “Windows” key + “p”.

; tip#5 - Open frequently used folder
#p::Run "C:\my-project\projectplan"

(6) Open frequently used document by pressing “Windows” key + “c”

; tip#6 - Open frequently used document
#c::Run open "C:\my-project\documents\codedesign.doc"

(7) Advanced scripting. In the following example, you can select any text from any application and press “Control+Alt+w”, which will open the Notepad++ application and paste the selected text.

; tip#7 - Advanced scripting
^!w::
Send, ^c
SetWorkingDir, %ProgramFiles%\WordNet\Notepad++\
Run, notepad++.exe
WinWait, Notepad++
WinActivate
Send, ^v{Enter}
return

References:

Do you use any other keyboard productivity tips? Please leave your comment.





Tags: ,

3 Responses to “Reduce Keystrokes using AutoHotKey for Windows- Productivity Tip#2 for Geeks”

  1. Nice blog you have… I have subscribed to your feed via my Google Reader.

    Cheers and good luck,
    Ajith
    PS: Thanks for visiting my blog today

  2. Hello Ramesh ..

    i found auto hotkey too, and i love it a lot !!

    They have so many user scripts on the site .. i’ve only started with an autotext script, and it’s so enjoyable to use.

    kind regards, michael

  3. I agree on finding Autohotkey an essential tool for a modern professional.

    I use the text replacement tricks a lot. Same thing with having scripts for launching the different browsers (Firefox, Flock, Opera., Safari and IE) with different home pages, or sets of tabs previously opened. You can use Autohotkey for many things really.

    A tip that works great with Autohotkey, is to locate the script itself in the Start Folder to avoid having to activate it everytime you turn your computer on.

Discussion Area - Leave a Comment





Enter your email address:

RSS
RSS Subscribe

Sponsors


Password Dragon


Free e-Book


Download Free eBook
Linux 101 Hacks Book
"These useful hacks are concise, well written and easy to read. Well done - I will recommend this eBook to my students."

Prof. Dr. Fritz Mehner
(Author of several Vim plugins)

Categories


pointer Linux pointer Database
pointer Hardware pointer Security
pointer Productivity pointer Java
pointer Software pointer Windows
pointer General



Popular Posts



12 Amazing Linux Books


  • 1. Sed and Awk
  • 2. Learning the Vi and Vim Editors
  • 3. Bash Cookbook
  • 4. SSH, The Secure Shell
  • 5. Essential System Administration
  • 6. Linux Server Hacks, Volume One
  • 7. DNS and BIND
  • 8. Understanding the Linux Kernel
  • 9. Linux Cookbook
  • 10. Linux Firewalls
  • 11. Linux Administration Handbook
  • 12. Beginning Ubuntu Linux
  • Read full review of these 12 books

Community
About TheGeekStuff
Ramesh

My name is Ramesh Natarajan. I will be posting instruction guides, how-to, troubleshooting tips and tricks on Linux, database, hardware, security and web. My focus is to write articles that will either teach you or help you resolve a problem. Read more