Live data from Hacker News

AutoHotkey v2 Official Release Announcement

autohotkey.com

81–90 of 153 posts

Re: AutoHotkey v2 Official Release Announcement

#81

I saw there's a python library that just lets you write autohotkey scripts in actual python code. I'd rather try that if I was going to rewrite my v1 scripts. AHK is awesome but the scripting language was never good. The new one looks like it has some better syntax, but native python support would be a much better solution for a lot of people.

In case you're open to something for JS instead of Python, my life has been much better since I switched from AHK to nutjs for my own automation scripts: https://nutjs.dev/

A real programming language, and support for multiple platforms!

Re: AutoHotkey v2 Official Release Announcement

#83
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…

Wished that you chose toml/yaml/json/etc. for the hotkey daemon. One thing I don't like about new custom DSLs is that they usually don't come with a syntax highlighter and auto-formatter.

Also, will you also get rid of the *.generated.ahk stuff in the next release? It would be far more ergonomic if komorebi can just read and apply the yaml config directly.

Re: AutoHotkey v2 Official Release Announcement

#84
post #52
post #24

I love Autohotkey because, in addition to its productivity benefits, it's a defensive tool against dark patterns imposed by user-hostile companies. For example, I've been using it for years to enter my Runescape password [1] due to Jagex being clueless about security [2] [1] https://reddit.com/r/runescape/comments/gxapao/how_to_paste_... [2] https://www.troyhunt.com/the-cobra-effect-that-is-disabling/

You can use KeePass for that too, you can even customize the script to press (password)(enter) with a single shortcut.

Yeah, being able to use it through type passwords in the terminal, in a DB GUI, even a VDI session is pretty neat.

I wanted to switch to one with better mobile experience, but the desktop experience in KeepassXC does make it worthwhile

Re: AutoHotkey v2 Official Release Announcement

#86

Earlier quoted context omitted.

In today's polyglot software development world, one real difference between someone who's a programmer and a software developer is fluency in multiple languages. That might come off better when it's Python and GoLang/C++/Rust instead of AHK, but realistically, every domain has their own DSLs. A competent software developer should be able to check their ego and use curly brackets instead of PEP 8 4 spaces if that is w…

Coming from an ahk user circa 2010, I have never been able to wrap my head around pythons insistence on indentation. Ahk let's me type whatever however and it just works.

Honest question, why? If you properly format your code then it's indented anyway so Python is basically just replacing `{` with `:` and then not having a `}`. Python is the least problematic of all the languages enforcing some style things. Go insisting on Google's stupid styleguide is just dumb, Lisp having the parentheses on the wrong positions and ignoring the fact that there is more than one bracket type available is dumb, all the languages with `END` blocks are dumb because `{ ... }` is much shorter and cleaner, ... . Python has its annoyances too but indentation really isn't a problem - it's there already anyway.

Re: AutoHotkey v2 Official Release Announcement

#87
I use AutoHotkey every day but find it’s not very reliable. I have one script that checks if the current window is File Explorer and if it is, gets the currently selected file or directory and does something with that. If I have more than one tab open, it will usually (but not always) give me the selected item from a different tab. Reloading the script fixes the issue sometimes.

Re: AutoHotkey v2 Official Release Announcement

#88

I use AutoHotkey every day but find it’s not very reliable. I have one script that checks if the current window is File Explorer and if it is, gets the currently selected file or directory and does something with that. If I have more than one tab open, it will usually (but not always) give me the selected item from a different tab. Reloading the script fixes the issue sometimes.

It looks like Explorer tabs are a very recent addition to W11, so perhaps it isn't fully supported by AH1?

Unless by 'tabs' you mean 'instances' or 'windows'?

Re: AutoHotkey v2 Official Release Announcement

#89

I use AutoHotkey every day but find it’s not very reliable. I have one script that checks if the current window is File Explorer and if it is, gets the currently selected file or directory and does something with that. If I have more than one tab open, it will usually (but not always) give me the selected item from a different tab. Reloading the script fixes the issue sometimes.

Tabs are new in the Windows Explorer, right? Did you update your script to reflect that?

Re: AutoHotkey v2 Official Release Announcement

#90
post #44

What are some use cases where having AHK scripts would help? On the same note, can anyone share some existing list of scripts and their functions which helped make their lives easier?

You can complain about ethics on this one but, for awhile, I was using an AHK script to autoclick through an aggressive "Your trial is over, Buy now please!" style dialog that randomized the position of the exit button for the box. The software would let you continue using it if you clicked through though.

Every ~200ms the script scanned a small portion of the screen where the exit button might appear in and if the script found the button then it would close the dialogue box for me.

Post reply on HN