wiki:windows:auto_hotkey:auto_hoykey
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:windows:auto_hotkey:auto_hoykey [2016/09/13 15:54] – external edit 127.0.0.1 | wiki:windows:auto_hotkey:auto_hoykey [2026/03/26 12:41] (current) – matt | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | https:// | + | |
| - | AutoHotKey is a scripting and automation program with an emphasis on keyboard shortcuts. I am by no means an expert and am just starting to find all the useful things it can do. I am in the process of migrating from my batch files to accomplishing these tasks with AHK. | + | ===== Essential Scripts ===== |
| - | + | I just recently finally overhauled my AHK scripts | |
| - | ==== Note on Working Directory | + | |
| - | A note on all of these Windows Explorer related | + | |
| - | + | ||
| - | ===== My Scripts ===== | + | |
| - | + | ||
| - | * [[#Window Always on Top|Window Always on Top]] | + | |
| - | * [[#Insert Date|Insert Date]] | + | |
| - | * [[#Create Dated Directory|Create Dated Directory]] | + | |
| - | * [[#Create Dated Directory | + | |
| - | * [[#Move PDFs to New Dated Sub-Folder|Move PDFs to New Dated Sub-Folder]] | + | |
| - | * [[#Run Program|Run Program]] | + | |
| - | + | ||
| - | ==== Window Always on Top ==== | + | |
| - | This will toggle any window to be always on top. It is a built in Windows function that normally has to be hooked into by the developer. This enables it universally. This was the one that brought me to AutoHotKey, because my boss wanted calculator to be locked on top. | + | |
| < | < | ||
| - | ^SPACE:: | + | #Requires AutoHotkey v2.0 |
| - | Winset, Alwaysontop, | + | |
| - | return | + | |
| - | </ | + | |
| - | ==== Insert | + | ; Insert |
| - | This will replace a succession of three d's with the current date in YYYYMDD format. | + | ; I use this to insert ' |
| + | ^-:: | ||
| + | { | ||
| + | Send " | ||
| + | return | ||
| + | } | ||
| - | < | + | ;Always on top CTRL + Space |
| - | :R*?:ddd:: | + | ;There are other ways to do this with PowerToys and such, but I've been using this since way before those options were available. |
| - | FormatTime, CurrentDateTime,, | + | ^space:: |
| - | SendInput %CurrentDateTime% | + | { |
| - | return | + | WinSetAlwaysOnTop -1, " |
| - | </ | + | } |
| - | ==== Create Dated Directory ==== | ||
| - | This creates a folder named " | ||
| - | < | + | ; Press D D D to insert date as YYYYMMDD |
| - | ^!d:: | + | ; The ability to quickly assign an inverse date to documents, logs, directories is essential for my sanity |
| - | Send !d | + | :?*:ddd:: |
| - | Send ^c | + | { |
| - | Destin = %Clipboard% | + | ; |
| - | FormatTime, | + | |
| - | FileCreateDir, %Destin%\%DatedDir% | + | SendInput(myDate) |
| - | </ | + | } |
| - | ==== Create Dated Directory with Prefix ==== | + | ; Pres F F F to insert Fairfield. |
| - | This creates | + | ; I type my city name so many times in a day that I had to crate this shortcut |
| + | :?*:fff:: | ||
| + | { | ||
| + | Send "Fairfield" | ||
| + | return | ||
| + | } | ||
| - | < | + | ; Win+1or2 cycles virtual desktops |
| - | ^!c:: | + | ; This makes Windows Virtual Desktops actually make sense again. Requiring 2 hands to navigate |
| - | Send !d | + | #1:: Send "{LWin down}{LCtrl down}{Left down}{LWin up}{LCtrl up}{Left up}" |
| - | Send ^c | + | #2:: Send "{LWin down}{LCtrl down}{Right down}{LWin up}{LCtrl up}{Right up}" |
| - | Destin = %Clipboard% | + | |
| - | PrefixName = Unsigned Invoices | + | |
| - | FormatTime, DatedDir, , yyyyMMdd | + | |
| - | FileCreateDir, | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Move PDFs to New Dated Sub-Folder ==== | + | |
| - | This creates a new dated directory and moves all PDFs in current directory into it. Saves a lot of scrolling | + | |
| - | + | ||
| - | < | + | |
| - | ^!m:: | + | |
| - | Send !d | + | |
| - | Send ^c | + | |
| - | Destin = %Clipboard% | + | |
| - | FormatTime, DatedDir, , yyyyMMdd | + | |
| - | FileCreateDir, | + | |
| - | FileMove, %Destin%\*.pdf, | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Run Program ==== | + | |
| - | Pretty straightforward. | + | |
| - | + | ||
| - | < | + | |
| - | ^!n:: | + | |
| - | Run C:\Program Files (x86)\Notepad++\notepad++.exe | + | |
| </ | </ | ||
wiki/windows/auto_hotkey/auto_hoykey.1473796481.txt.gz · Last modified: by 127.0.0.1