Re:Learn AutoHotKey by stealing my scripts
by ramenbytes on Tuesday August 22, 2023 @03:21AM
(#37219669)
You know, that's part of what's been holding me back from using it for much besides remapping CapsLock to Control. Maybe it's time to sit down and write a Lisp DSL that compiles to it.
Re:Learn AutoHotKey by stealing my scripts
by pmontra on Tuesday August 22, 2023 @03:40AM
(#37219759)
Or make it call a cloud service running a real program in a kubernetes cluster, which gets the hotkey and returns a script to interpret. If AutoHotKey does not have network and eval functions, they must be added ASAP
:-)
It's always time to sit down and write a lisp DSL. That compiles itself to AutoHotKey scripts so you can compile while you key.
(I am in the process of doing this inside OpenSCAD.)
Re:Learn AutoHotKey by stealing my scripts
by ad8e on Wednesday August 23, 2023 @11:35AM
(#37237682)
Remapping Capslock to Control:
Windows: https://github.com/randyrants/sharpkeys
Ubuntu Linux (don't know about other Linuxes): /usr/share/X11/xkb/symbols/pc
key <CAPS> { [ Caps_Lock ] };
-> key <CAPS> { [ Control_L ] };
This avoids needing to keep an AHK application (or other keybinding application) open. The Linux solution unfortunately resets after every version upgrade.
Re:Learn AutoHotKey by stealing my scripts
by poisonborz on Tuesday August 22, 2023 @03:54AM
(#37219837)
That's why Autohotkey v2 exists, which is... AHK's own Python3 moment, since it was available for years. Well, ok, stable release was only like a year ago, but I don't see much adoption.
I believe I’m using v2, since I written most of my scripts last year by most recent documentation which mentioned “old ways” sometimes. But it didn’t make a big difference in that regard.
Re:Learn AutoHotKey by stealing my scripts
by hwayne on Tuesday August 22, 2023 @12:13PM
(#37224811)
Couple of ways to tell
1. Do your multiline hotkeys have `Return` in them, or are they in braces?
2. Do you write `Send Foo` or `Send "Foo"`?
If you're doing the former, then I really recommend upgrading to v2, it makes a huge difference.
[delayed]
Re:Learn AutoHotKey by stealing my scripts
by layer8 on Tuesday August 22, 2023 @05:47AM
(#37220525)
TFA uses V2. I also started using AHK just in time to use V2. Of course it will take time for all the V1 users to migrate, but for anyone starting now it makes little sense to use V1.
it's just a bit tedious to convert even with the help of a converter, especially when you're dealing with libraries which you didn't write, but still very much worth it (you could maybe also do a lot of the conversion piecemeal and just run both for some time)
Re:Learn AutoHotKey by stealing my scripts
by hwayne on Tuesday August 22, 2023 @12:14PM
(#37224827)
Part of the problem IMO is that AHKv2 is magnitudes better if you're a programmer, because it makes the entire language consistent and sane. But if most users aren't programmers, so they don't have the same burning incentive to switch.
I found ahk python module [2] but combining it with the keyboard module doesn't work as well as autohotkey as a hotkey listener.
[1]: https://github.com/idbrii/daveconfig/blob/main/win/autohotke... [2]: https://pypi.org/project/ahk/