Windows HowTo: macros on windows

1. Install autohotkey
2. Open notepad > paste the code > 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 !

Test:
1. Open notepad
2. Type: Ctrl+9
3. Type 't'
You should see 'Thank you' being typed.

Similarly you can type Ctrl+9 > d > you should see tomorrow's date.

Code:
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% `n
}
return


If you guys like this, let me know. And I'll share info
 
Autohotkey is pretty great. I can't code at all but I've been able to use it!
My 2020 Zephyrus G14 didn't come with page up, down; home and end keys so I used an ahk script to make up some macros. This is useful for other laptops or 60% keyboards as well.

Here's what I'm using:

Code:
>^Down:: Send {PgDn}

>^Up:: Send {PgUp}

>^Left:: Send {Home}

>^Right:: Send {End}

>!-:: Send {Home}

>!=:: Send {End}

ctrl+[arrow keys] or alt+[- and =] work as page up, down; home and end keys
 
Back
Top