Live data from Hacker News

In Praise of AutoHotKey

hillelwayne.com

201–210 of 220 posts

Re: In Praise of AutoHotKey

#202
It's a little different, but I've been using Typinator for this for a long time. In addition to a bunch of default auto-swaps to correct common typos, it has a bunch of built-in libraries for inserting things like Greek characters, arrows, symbols, and emoji. One huge time-saver for me has been in grading: I have to grade student assignments regularly, and I fill out a short text-based rubric chart as I go. So I have a shortcut for it: I type "\\gt" and I get prompted for the student's name, then it creates a new rubric block with the student's name already inserted and the cursor positioned to start entering scores. Stuff like that is a huge time-saver in terms of wear-and-tear on the arrow keys or moving to use the mouse.

Re: In Praise of AutoHotKey

#203
Autohotkey is the only reason I still use windows at home and it makes work (where I have to use windows) actually bearable.

I have enjoyed reading the comments here, I have picked up some good tips; obvious ones I should have actually thought of.

I am glad I am not they only person who started programming using this language. I have to say that in my limited experience the documentation for Autohotkey is second to none despite that the syntax could use improvement.

Re: In Praise of AutoHotKey

#204
post #48

AHK solved a quirky issue my work had me develop. We have an excel sheet that gets updated periodically throughout the day by various people. When the spreadsheet is saved it also publishes an MHT file to be displayed on a webbrowser that refreshes every 5 minutes. That browser runs on a little Intel stick plugged into a wall-mounted TV to show the spreadsheet to various parts of the office / production floor. At nig…

Ooh, I'm guessing Windows and its weird treatment of powered-off monitors. I dual-boot and leave my home PC on for weeks at a time; I just power the screens off when I stop working. My Linux system doesn't even notice; when I come back, everything is at it was. Windows however, the second it notices I powered off one screen, moves all the Windows to the other one. So the first thing I have to do when I come back is t…

These might help:

https://superuser.com/questions/453446/how-can-i-stop-window...

https://answers.microsoft.com/en-us/windows/forum/windows_10...

Particularly st99's answer on the second link.

Re: In Praise of AutoHotKey

#205

Earlier quoted context omitted.

The downside is Karabiner Elements requires installing a kext, and macOS Catalina periodically shows warnings saying the kext is a legacy extension.

Man as someone who has been putting off the upgrade that's too bad, I figured their solution of creating kind of a virtual keyboard input would be pretty solid going forward. Does Hammerspoon work just as well? Karabiner is so incredibly solid.

Hammerspoon is doing the stuff talked about here using event taps. I don't know if you can reliably use event taps to simulate different modifiers though, or to prevent a modifier from actually taking effect (e.g. if you wanted to remap one modifier to another).

I'm hoping Karabiner Elements figures out some solution going forward. It still works on Catalina but the expectation is the "legacy kext" will no longer function on 10.16.

Re: In Praise of AutoHotKey

#206

I learned programming with AutoHotkey when I was 15. I first used it to automate grinding gold and items in a simple flash-based RPG for me and my younger siblings around ~2005. At first it just clicked certain locations that buttons would be on a fixed schedule to advance a quest to the end and repeat. But then, being a flash game after all, sometimes it would take a second to load the next screen which throws off t…

> copied the raw compiled machine code (as hex) into AutoHotkey and directly called it with DllCall Holy potatoes, you can do that?! Or, I suppose, you could do that, because I half-expect you can't anymore with all the various security features that were added to Windows over the last two decades. But cool stuff nonetheless. It reminds me of my own foray into the space of running assembly output; back in my teenage…

Yep! Actually I'd bet it still works today. I was able to find it in my Dropbox (2005 me's solution to version control). This is the function that does the dirty work [1]. That gist also has the C source as well. Date modified on these files are ~2008-9.

[1]: https://gist.github.com/infogulch/d88b956ddd86bd00b351649511...

Re: In Praise of AutoHotKey

#207
post #41

Did nobody else get a TLS (HTTPS) certificate warning for the site? For me it shows it expired 2020-04-26T14:00:00+0200 (I guess that would be pretty crappy for a MITM, unless that's exactly the point since an unknown CA would be more suspicious than someone "forgetting to renew their cert").

Nope. The cert I get expires May 20, 2021

Same for me now, thanks for checking! I guess a lot of people just clicked past the warning without even mentioning it in a comment until it was updated :| (Assuming that is what happened.)

Re: In Praise of AutoHotKey

#208

Earlier quoted context omitted.

Ooh, I'm guessing Windows and its weird treatment of powered-off monitors. I dual-boot and leave my home PC on for weeks at a time; I just power the screens off when I stop working. My Linux system doesn't even notice; when I come back, everything is at it was. Windows however, the second it notices I powered off one screen, moves all the Windows to the other one. So the first thing I have to do when I come back is t…

These might help: https://superuser.com/questions/453446/how-can-i-stop-window... https://answers.microsoft.com/en-us/windows/forum/windows_10... Particularly st99's answer on the second link.

Thanks!

Re: In Praise of AutoHotKey

#209
I use AHK to make CapsLock a custom modifier key, mostly to make VIM style movements available everywhere.

Caps+p Ctrl+Backspace Delete previous word Caps+f Backspace Caps+d Delete Caps+h/j/k/l Left/Down/Up/Right Arrow Caps+u/i Home/End Caps+m/, Page Down/Up Caps+e/r Ctrl+Left/Right (next/previous word) Caps+3 Insert current date, e. g. 14.05.20 Caps+Shift+3 ISO format 2020-05-14

I also swapped Return with ' so it's closer to my pinky. Not sure if that was worth it, though.

Re: In Praise of AutoHotKey

#210
post #17

I've started[1] to do similar things on macOS using Hammerspoon[2]. So far I've set it up to let me: 1. Use shift when pasting something to simulate typing in the text instead, getting around websites that block pasting. 2. Use ";" as a hyper key. By holding it down and pressing another key, I can switch between specific programs without cycling. I can also use hjkl as arrow keys. 3. Automatically switch audio input…

Although really intreaged to finally find some really good use for Hyperspoon something in that script didn't work. pressing ; and releasing it kept the hyper active so if you pressed some trigger key it triggered it instead of doing the input. Also pressing ; repeated did of course nothing.

Wished there would be a better way to actually map hyper key that only is activated if pressed down. Well, I went back to BTT and setup fn + and this works too.

Post reply on HN