datavectors wrote: ↑25 Apr 2022, 06:13
I have just joined this forum to see how AHK is applied by cross platform users.
As one Ubuntu user to another.
Actually I do have Windows 10 in dual boot setup but largely I develop these days in Ubuntu.
I have searched for cross platform automation tools...
Eventually, there will be a cross platform offshoot of AHK, which is Keysharp (
viewtopic.php?f=80&t=77248) and uses C#/.NET. If you check Mfeemster's Bitbucket, he's making constant progress. This will cover Linux and the macOS, and it should be eventually able to run on Android, either by the user adding more Linux subsystems to Android (as Android is built on top of a Linux kernel) or a variant of Keysharp that runs on Android (via .NET 6 or later). A few examples on the focus on cross platform functionality: Convert an Android Device to Linux (
https://www.linux-magazine.com/Online/Features/Convert-an-Android-Device-to-Linux) or Dot Net 6 (.NET 6) and How It Impacts Various Operating Systems? (
https://www.ashutec.com/blog/dot-net-6-and-how-it-impacts-various-operating-systems-5b10399e47a3)
There is another AHK user who is in the process of porting an earlier version of AutoHotkey (using the Crystal language). This is AHK_X11, AutoHotkey for Linux (
viewtopic.php?f=81&t=106640). By the way, this is possible with not just Crystal, but many other C/C++ alternative and cross-platform languages such as Object Pascal, D, Go, Rust, V, Red, C# (used with Keysharp), etc... Phil294 (AutoHotkey for Linux ) has also made it known that he would like to help/collaborate with Mfeemster (Keysharp), for whatever might be needed for Linux. Something to also be said of this Linux port of an earlier version of AHK, is it could be able to run on an Android too, after some modifications.
Additionally, there is the WINE project (
https://www.winehq.org/), which runs on Linux, macOS, and Android. WINE is constantly having new releases and improving, so they are something to keep an eye on too. A version of WINE could be coming, that will allow the existing Windows AHK to have some useful functionality on other OSes, depending on what is being done.
AHK users can look forward to the possibility of using variants of AHK that are much closer to the Windows version (maybe even eventfully the current Windows AHK being somewhat useful on WINE) and are connected to the AutoHotkey website versus much more foreign automation scripting languages that look and do things very differently.
Now I deplore using Wine on Ubuntu. Ubuntu internal tool to look at is xdotool.
The idea of using xdotool with AHK, is quite old. Tinku99, created AutoHotkeyX, and used it with WINE. That version got a Platinum rating with WINE, however, that was quite a while ago and is poorly documented. That old version of AutoHotkey.dll was compiled with GCC, not Visual Studio and used xdotool.dll. It was a much more WINE friendly version of AutoHotkey, and it's interesting that the idea was not pursued more (specifically compiling more WINE friendly versions of AutoHotkey).
Below are related links (updated):
https://appdb.winehq.org/objectManager.php?sClass=version&iId=17738
(WINE AutoHotkeyX)
https://github.com/tinku99/ahkx/tree/master/xdotool
(Tinku99's AutoHotkeyX)
https://www.autohotkey.com/board/topic/28748-compiling-with-gcc/
(Compiling with GCC (old version of AHK))
https://github.com/tinku99/ahkmingw
(Compile autohotkey (old version) using gcc / mingw on windows)
Note: Tinku99 seems to still have some occasional activity on GitHub, so might be contacted over there.
AutoHotkey 1.0.48.05 (AHK v1 "Classic") can be installed and run on Linux using WineTricks (greater convenience). WINE should arguably not be looked down upon, because it is cross platform. Not just for Linux, but macOS and Android. The theory is that you can take a Windows only project, and bring it to multiple other OSes. WINE has been hit and miss on delivering that dream, but they keep coming out with better new releases too. Below is a YouTube video about such.
https://youtu.be/B2kRlouBtpc
(How to Install and Run AutoHotKey on Linux using WineTricks)