GyaaniGuy

- self made 💻 😎

Text macros with autohotkey on windows

Bored of typing your name / address / email / Just plain ‘thank you’ over and over. Read on.

Quick Instructions

  1. Install Autohotkey
  2. Open notepad > paste the code shown below > save as something.ahk . Make sure its not something.ahk.txt
  3. Right click the something.ahk file > Run as admin. Observe the ‘H’ icon in your notification area

Done !

Usage / Test

  1. Open notepad
  2. Type: Ctrl+9
  3. Type ‘t’ -> ‘Thank you’ should be typed automatically
  4. Type ‘d’ -> Tomorrow’s date should be typed

Code

#Persistent
#InstallKeybdHook
DetectHiddenWindows, ON
SetKeyDelay, 1

^9::
Input Key, L1
if Key = w
    Send wtf
else if Key = t
    Send Thank you
else if Key = d
{
    Tomorrow = %a_now%
    Tomorrow += 1, Days
    FormatTime, Tomorrow1, %Tomorrow%, yyyy-MM-dd
    Send Tomorrow %Tomorrow1%
}

Configuring

The code should be self explanatory. But all you need to do is add more else if blocks at the end.

Example:

else if Key = e
    Send nik.jain@gmail.com
else if Key = n
    Send Nikhil Jain

The End

I hope that was helpful.


dated June 2024