I love AutoHotKey but why do I have to learn a new language to use it? Why can't it use an established language like js or python?
AutoHotKey V2 (Breaking Upgrade)
71–80 of 124 posts
Re: AutoHotKey V2 (Breaking Upgrade)
#72I love AutoHotKey but why do I have to learn a new language to use it? Why can't it use an established language like js or python?
Re: AutoHotKey V2 (Breaking Upgrade)
#73Earlier quoted context omitted.
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.
Well, what? My objection is calling a closure for “nested function”, a term I’ve never seen for such a thing.
Re: AutoHotKey V2 (Breaking Upgrade)
#74As everyone says AHK is phenomenal but the scripting language is pretty warty. I wonder if they considered using Lua or something instead of improving their custom language?
Re: AutoHotKey V2 (Breaking Upgrade)
#75Text Shortcuts on Mac is limited and unreliable, and I haven’t found a good 3rd party replacement yet.
Re: AutoHotKey V2 (Breaking Upgrade)
#76Earlier quoted context omitted.
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.
Well, what? My objection is calling a closure for “nested function”, a term I’ve never seen for such a thing.
Re: AutoHotKey V2 (Breaking Upgrade)
#77Re: AutoHotKey V2 (Breaking Upgrade)
#78Earlier quoted context omitted.
> I found a way to live without them all. I'm not willing to sacrifice my productivity for some ideological purity. It would take weeks to create a fraction of what AHK already does for me with scripts I have improved every year. I tried to explain in another thread some of the remappings I have: like how Caps often ends us remapped to Esc (when alone) or Control (in conjunction with another key: act as a modifier) o…
> Going up 2 pages up in the browser? The left shift pressed twice (Shift Shift) gives me 2 PageUp. Is this on a device with a tiny keyboard, or is it really something you do so often you want it on the main area instead of pressing PageUp twice?
/Sure/ I can scroll with mouse or page-up, but that needs my right hand. And I eat at my computer while reading sometimes...
So I put a scrollball on the left side of my keyboard. (though spacebar and shift+spacebar generally work too)
https://hackaday.io/project/203-keyboard-with-apple-mouse-sc...
Re: AutoHotKey V2 (Breaking Upgrade)
#79Would a tool like Auto hotkey if it were implemented on Linux work with Wayland?
AHK lets you run arbitrary code in response to global hotkeys. There is no wayland protocol for applications to register global hotkeys for themselves. Compositors can choose to provide their own hotkey configurations, and what you can do in response to those hotkeys being pressed depends on the compositor. For example in Sway you can register hotkeys to run arbitrary executables. Alternatively, XDP apparently has a portal API for applications to register global hotkeys, but of course it's up to the individual compositors' portal implementations if they implement the API. For example xdpw, used for all wlroots-based compositors like sway, does not.
AHK lets you read and set the mouse position. There is currently no wayland protocol, stable or unstable, for programs to read or set the position of a pointer (if the pointer is not over the program's surface).
AHK lets you introspect arbitrary windows to read the text of a focused textbox, etc. There is currently no protocol, stable or unstable, for programs to implicitly grab the content of surfaces under the pointer, let alone read text of textboxes. At best you can use the XDP Screencast protocol but that only gives you images (AHK integrates with the standard Windows graphics UI API so it can detect textboxes etc), and even then it might pop up a permissions dialog for the user to approve like you would expect for a screencasting program.
AHK lets you insert arbitrary keyboard sequences into the focused window. There is no Wayland protocol for this, but you can just use a new input device through the uinput kernel driver instead of anything Wayland-specific. (ydotool does this.)
AHK lets you read and write to the clipboard. There is an (unstable) wayland protocol for clipboard managers that can be used for this.