Live data from Hacker News

AutoHotkey v2 Official Release Announcement

autohotkey.com

11–20 of 153 posts

Re: AutoHotkey v2 Official Release Announcement

#11
post #7

Autohotkey is awesome and special, and everybody on Windows should learn it. There is no such thing on any other OS. v2 syntax and features are so much better. It was basically in development for a decade and AHK itself more then 20 years.

> There is no such thing on any other OS. I thought the Mac comparable was Keyboard Maestro. Are the two that different (asks someone who hasn't used Windows since the '90s)? https://www.keyboardmaestro.com

Another utility along those lines for macOS is Hammerspoon:

https://www.hammerspoon.org/

Re: AutoHotkey v2 Official Release Announcement

#12

Autohotkey is awesome and special, and everybody on Windows should learn it. There is no such thing on any other OS. v2 syntax and features are so much better. It was basically in development for a decade and AHK itself more then 20 years.

macOS has AppleScript that does the same thing, and it’s built into the OS. https://developer.apple.com/library/archive/documentation/Ap...

Re: AutoHotkey v2 Official Release Announcement

#13
Funny, just yesterday I was working on automating my linux-desktop, and for specific capabilities, I only found solutions for AHK on Windows, not the normal tooling on Linux. And it seems the limitation of capabilities are for security reasons, like for example, the inability to send Keyboard-inputs to an unfocused window. How is this with Windows and AHK? Has Microsoft also shutting down abilities and crippling AHK in the last years? Or how is something like AHK still working find and powerful after such a long time?

Re: AutoHotkey v2 Official Release Announcement

#14

Funny, just yesterday I was working on automating my linux-desktop, and for specific capabilities, I only found solutions for AHK on Windows, not the normal tooling on Linux. And it seems the limitation of capabilities are for security reasons, like for example, the inability to send Keyboard-inputs to an unfocused window. How is this with Windows and AHK? Has Microsoft also shutting down abilities and crippling AHK…

I haven't had a single script fail yet. Haven't updated most in 5 years.

Re: AutoHotkey v2 Official Release Announcement

#15

Funny, just yesterday I was working on automating my linux-desktop, and for specific capabilities, I only found solutions for AHK on Windows, not the normal tooling on Linux. And it seems the limitation of capabilities are for security reasons, like for example, the inability to send Keyboard-inputs to an unfocused window. How is this with Windows and AHK? Has Microsoft also shutting down abilities and crippling AHK…

>send Keyboard-inputs to an unfocused window

I'm pretty sure AHK can direct key presses based on process id or window id.

Re: AutoHotkey v2 Official Release Announcement

#16
post #9

The scripting language for version 1 was pretty terrible but having messed with version 2 for a while now I'd say it's pretty decent.

I have a not-too-long list of keybinds that's currently on v1. Would you mind taking a look and letting me know if anything's not v2 compatible? [0] I don't think anything is that complicated, there's a loop or two although tbh those were more one-time-use things I haven't bothered to get rid of, in part so I have the syntax there as a reference in case I need it again. I do remember reading something about SetTitleMatchMode being deprecated though, but I'm not sure if that includes RegEx.

[0] https://github.com/RheingoldRiver/misc_settings/blob/master/...

Re: AutoHotkey v2 Official Release Announcement

#17
post #10
post #7

Earlier quoted context omitted.

> There is no such thing on any other OS. I thought the Mac comparable was Keyboard Maestro. Are the two that different (asks someone who hasn't used Windows since the '90s)? https://www.keyboardmaestro.com

Maestro is more like a Macro Recorder while AutoHotkey is a programming language for automation. Also AHK community is huge.

Keyboard Maestro is not just a Macro Recorder. It can control most of the Mac interface and most applications. You can start using it as a recorder but when you learn to to incorporate applescripts and other tricks, it can manipulate the entire Mac experience. I would be lost without it.

Re: AutoHotkey v2 Official Release Announcement

#18
post #3

AHK allows me to program my own eclectic mashup of emacs and vim and put it in every single app on my windows machine including VS, VS Code, Chrome, Word, outlook, everything! My brain is broken without it, it is a godsend. For the curious, like emacs, my "command mode" is whether or not I'm holding the alt key. Like vim, my command mode navigation is based on the relative positions of different keys. I know that vim…

Hah, are you me?

> Alt/Capslock + IJKL is a universal way to get arrowkeys https://news.ycombinator.com/item?id=29162132

I have similar keys to yours, but U and O are left/right four times, and 8 and , are up/down four times. Could make it more, I just know that 3 is to small.

I also use ahk as my window manager, which is essential for working on a 4k 100% scale screen: https://www.autohotkey.com/board/topic/79338-simple-window-p...

I also also have a hotkey for nearly every program I use on a daily basis. Win 0-9 are used of course, but Caps+F1-F12 are also used, and I've recently added Insert+letter keys to my collection thanks to my new fancy QMK keyboard. My goal is to never alt tab again :)

I also also also have an emacs/whichkey kinda thing, which does exactly what you think:

    CapsLock & E::WhichKeyMenu()
    WhichKeyMenu() {
      CoordMode, Menu, Screen
      Menu, WhichKeyMenu, Add, &C Code, Code
      Menu, WhichKeyMenu, Add, &D Desktop, Desktop
      Menu, WhichKeyMenu, Show, % A_ScreenWidth/2, % A_ScreenHeight/2
      return
    
      Code:
        run, explorer.exe C:\code
      return
    
      Desktop:
        run, explorer.exe C:\Users\dharm\Desktop
      return
    
    }
This is, of course, extensible to any AHK command, not just running explorer. Also means I don't have to memorize every goddamn shortcut. Only weird thing is that I have to exit out of it with Alt. Escape doesn't work and I dunno why.

Re: AutoHotkey v2 Official Release Announcement

#19
I ended up using AHK for komorebi[1] because I was still new to Windows when I started writing it and I didn't wanna have to write a tiling window manager AND a hotkey daemon. I even ended up generating a nice little AHK library to wrap around CLI commands that sent socket messages to the window manager to make it easier to write a configuration.

Ultimately the syntax changes make it impossible to fully reproduce the same library for AHKv2, which is being installed by default on all mainstream package managers now.

I ended up biting the bullet and making my own hotkey daemon[2] for use with komorebi based on skhd[3] and I haven't looked back since. This will be the "blessed" hotkey daemon recommended for use in the next release of komorebi.

I'm still using AHK (v1) for the stuff that it's good at (and there is a lot of stuff that it's good at!), but ultimately I've found that it's not the right tool as a hotkey daemon for a socket-based tiling window manager (or just generally, for triggering CLI commands).

[1]: https://github.com/LGUG2Z/komorebi

[2]: https://github.com/LGUG2Z/whkd

[3]: https://github.com/koekeishiya/skhd

Re: AutoHotkey v2 Official Release Announcement

#20
post #19

I ended up using AHK for komorebi[1] because I was still new to Windows when I started writing it and I didn't wanna have to write a tiling window manager AND a hotkey daemon. I even ended up generating a nice little AHK library to wrap around CLI commands that sent socket messages to the window manager to make it easier to write a configuration. Ultimately the syntax changes make it impossible to fully reproduce the…

Can't you just right click on you script and pick "compile" or something similar to pack the v1 interpreter with your code? I remember a functionality like that existing.
Post reply on HN