DEV Community

Discussion on: Remap and Set Global Hotkeys on Windows 10 with Auto Hotkey

Collapse
 
nickjj profile image
Nick Janetakis • Edited

Thanks.

The hotkeys are nice for saving time. Your frequently used apps and files / folders can all be 1 key press away.

I just set up a fun one yesterday (not covered in this article). I set up a hotkey to open a specific CSV file that I open on the first of every month to pay out affiliates for the previous month.

But I programmed the hotkey to open last month's CSV file, so it involved dynamically calculating the date and adjusting it by -1 month since I namespace my CSV files by a dated folder.

That looked like this:

#a::
thisMonth := A_YYYY
thisMonth += -1, D
FormatTime lastMonth, %thisMonth%, yyyy-MM
Run, scalc.exe D:\src\scripts\affiliates\%lastMonth%\payouts.csv
return
Enter fullscreen mode Exit fullscreen mode

It's so much faster to hit Win + a instead of navigating to that affiliates directory manually to open the CSV file.

Or... here's another one since I wrote this article last month. This one gets the hex code of the pixel color under your cursor and copies it to your clipboard.

#h::
MouseGetPos, MouseX, MouseY
PixelGetColor, color, %MouseX%, %MouseY%
StringLower, color, color
clipboard := SubStr(color, 3)
Enter fullscreen mode Exit fullscreen mode

The moral of the story is, with these hotkeys you can really customize your workflow to make it work best for you with little effort.