Live data from Hacker News

AutoHotkey v2 Official Release Announcement

autohotkey.com

71–80 of 153 posts

Re: AutoHotkey v2 Official Release Announcement

#71
post #36

Earlier quoted context omitted.

I really don't see how AHK's script language is somehow not intuitive or simple enough. The syntax is pretty easy to grasp. You have all the tools "natively" to even pick positions on windows, its pretty extensive too.

I write AHK scripts like once or twice and then forget about it. I can't remember the sytax so I'm constantly googling. I'd rather have it in a language I already know well. Also as a long time programmer who knows a lot of languages, the AHK syntax (at least in V1) was anything but intuitive. It had very weird conventions.

I find the syntax easy and the documentation (of v1, not enough experience with v2) is easily accessible and of high quality. V2 solves some inconsistencies in the syntax and language but at the cost of being compatible with v1. I've been able to port my v1 scripts to v2, and I'm a lousy programmer.

Re: AutoHotkey v2 Official Release Announcement

#72
post #56

Earlier quoted context omitted.

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.

I just downloaded v2, purely by incident (haven’t used AHK for some time) but there is now official support for compile-to-exe. No idea how good it is, I’ve only used AHK for one-offs, short term projects, etc.

That's in v1 too.

Re: AutoHotkey v2 Official Release Announcement

#73
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

I use Karabiner Elements and Hammerspoon. Hammerspoon scripts are written in LUA, Karabiner Elements has a large repository of useful scripts.

On Linux I use Wayland but there are several ways to tackle that, involving /dev/uinput. For example there's Python bindings for that and several Rust apps to achieve it. In the end I use ydotool and kbct.

On Android I use MacroDroid.

You can also do some neat stuff with Selenium.

Re: AutoHotkey v2 Official Release Announcement

#75
post #57

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.

Pyautogui? https://github.com/asweigart/pyautogui That one is also cross-platform, if that’s useful to you.

That doesn't seem to do any of the hotkey, hotstring etc. stuff that is AutoHotKey's main purpose.

Re: AutoHotkey v2 Official Release Announcement

#76

Earlier quoted context omitted.

I'm not an expert, but these are basically the changes I would see that need to happen: All of the places where you use commands no longer need a preceding comma: Run, Calc.exe This is now just: Run "Calc.exe" Similarly, all areas where you use strings now need to be quoted: Send, https://discord.gg/6SNQ4c6 Will now have to be: Send "https://discord.gg/6SNQ4c6" AFAIK the area where you use "blocks" of code like this:…

oh wow, that's a pretty comprehensive set of changes, thanks for the reply! I'll procrastinate on this a bit then, it looks like it'll be closer to an hour than five minutes, although not too bad simply because it's not that big a file.

Yes I was busy for an hour (I switched a month or so ago) with my 1k script and I am a lousy programmer. However every error was easy to debug. The documentation was ace (probably even better now?), and when I got stuck regardless a couple of search engine queries got me covered.

Re: AutoHotkey v2 Official Release Announcement

#79
post #63

I recently updated my scripts to work with ahkv2. https://github.com/EBADBEEF/ahkv2-scripts Some things I'm proud of here: - easy debug console (https://github.com/EBADBEEF/ahkv2-scripts/blob/main/Autostart.ahk#L4) - compose keys (to type keys like "¿ é ü" easily). Includes libX11 key database parser - window move and resize with mouse I love AutoHotkey's documentation. It is an old school windows help file (chm) and…

Old school is .hlp not .chm

At that point it probably "ye olde skool"
Post reply on HN