Live data from Hacker News

AutoHotKey V2 (Breaking Upgrade)

autohotkey.com

1–10 of 124 posts

Re: AutoHotKey V2 (Breaking Upgrade)

#2
I'm surprised no one has mentioned this; AHK broke compatibility with this upgrade. I tried upgrading autohotkey and it braked my scripts. It seems to have an auto-regress feature, which is nice. If someone knows where there is a comprehensive this-for-that upgrade guide, that would be nice; I didn't see such a thing on the site.

Re: AutoHotKey V2 (Breaking Upgrade)

#3
The changes doc would be 10x more usef if it included more examples of the changes. https://www.autohotkey.com/docs/v2/v2-changes.htm

I do wish programmers had more options in general for this kind of thing. I ran into https://github.com/autopilot-rs/autopilot-rs lately but it is extremely simple. On Windows there s UI Automation, which can help script many conventional apps. https://learn.microsoft.com/en-us/dotnet/framework/ui-automa...

Re: AutoHotKey V2 (Breaking Upgrade)

#4
As someone who recently dove back into AHK, I must say v2 has been fantastic!

So many great quality of life improvements and overall the documentation is top notch. I cobbled together a launcher app and modal-hotkey system from scratch in a couple of afternoons of enjoyable work.

If you're looking to try stuff out, having an autoreload function is a very nice addition to your script while developing.

A very pragmatic and productive experience.

Re: AutoHotKey V2 (Breaking Upgrade)

#5
post #4

As someone who recently dove back into AHK, I must say v2 has been fantastic! So many great quality of life improvements and overall the documentation is top notch. I cobbled together a launcher app and modal-hotkey system from scratch in a couple of afternoons of enjoyable work. If you're looking to try stuff out, having an autoreload function is a very nice addition to your script while developing. A very pragmatic…

Is the modal hotkey system public code?

Re: AutoHotKey V2 (Breaking Upgrade)

#6
> > Nested Functions

> One function may be defined inside another. A nested function may automatically "capture" non-static local variables from the enclosing function (under the right conditions), allowing them to be used after the enclosing function returns.

That sounds like a closure. I expected “nested” to mean that the function is defined inside another function but doesn’t capture anything, like what you can do in Rust. (It’s IMO a “why not?” feature—why don’t more languages allow it? It’s certainly useful for helper functions which are only consumed by one other function.)

Re: AutoHotKey V2 (Breaking Upgrade)

#9
post #6

> > Nested Functions > One function may be defined inside another. A nested function may automatically "capture" non-static local variables from the enclosing function (under the right conditions), allowing them to be used after the enclosing function returns. That sounds like a closure. I expected “nested” to mean that the function is defined inside another function but doesn’t capture anything, like what you can do…

Well, C++ has lambdas with explicit capture list. A captureless lambda is basically a function (it even converts to a function pointer), otherwise it's a closure.

Re: AutoHotKey V2 (Breaking Upgrade)

#10
Somewhat timely. AHK is one of those utilities I absolutely cannot go without. I've been running it on all my Windows machines for 15 years now.

Just a few days ago I was complaining¹ about how Excel handles formula input. After some back and forth on my yak-shaving attempt, I realized I could shave it myself with AHK.

With this little bit of code, my [Enter] and [Tab] keys work the way I want them to in Excel. This is still version 1.1, not 2.0:

    ; Try to "fix" Excel formula bar
    ; ==============================
    IsExcelFormulaBox() 
    {
        ControlGetFocus, F, A
        return (F="EXCEL
[1] https://news.ycombinator.com/item?id=34176791
Post reply on HN