We want AHK for Linux!

Propose new features and changes
burque505
Posts: 1124
Joined: 22 Jan 2017, 19:37

Re: We want AHK for Linux!

28 Nov 2019, 13:33

Hmm, just saw this. I had tried to compile AutoHotkeyX on Linux, but I'm not sure if that was before this post or not (October 2018). Looks like I have some Linuxing to do this weekend. :D
User avatar
SL5
Posts: 877
Joined: 12 May 2015, 02:10
GitHub: sl5net
Contact:

Re: We want AHK for Linux!

28 Nov 2019, 15:51

burque505 wrote:
28 Nov 2019, 13:33
Hmm, just saw this. I had tried to compile AutoHotkeyX on Linux, but I'm not sure if that was before this post or not (October 2018). Looks like I have some Linuxing to do this weekend. :D
I keep my fingers crossed and wish you luck. And I am very curious what you bring from the weekend. I still think that maybe you did not understand what my script does. You do not ask questions. Maybe I am wrong because I do not understand what you are doing and why. Good luck :)
User avatar
SL5
Posts: 877
Joined: 12 May 2015, 02:10
GitHub: sl5net
Contact:

Re: We want AHK for Linux!

29 Nov 2019, 04:36

burque505 wrote:
28 Nov 2019, 13:33
Hmm, just saw this. I had tried to compile AutoHotkeyX on Linux, but I'm not sure if that was before this post or not (October 2018). Looks like I have some Linuxing to do this weekend. :D

Just read one of my last posts in this board. I do not understand you? Are you doing this on purpose? :wtf: That can not be that hard or is it?
burque505
Posts: 1124
Joined: 22 Jan 2017, 19:37

Re: We want AHK for Linux!

29 Nov 2019, 09:04

I do not understand either your lack of comprehension or the tone of your comment. If you do not like my posts, do not read them.
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: We want AHK for Linux!

29 Nov 2019, 15:05

SL5 and burque505 are both great users, so I think there's just been some genuine misunderstanding. Cheers.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
SL5
Posts: 877
Joined: 12 May 2015, 02:10
GitHub: sl5net
Contact:

Re: We want AHK for Linux!

30 Nov 2019, 15:37

this listens to CTRL+1 and sends a message box. and gives feedback where its coming from (window title, window class):
msgbox if ctrl 1 2019-11-30_21-34-55.png
msgbox if ctrl 1 2019-11-30_21-34-55.png (59.61 KiB) Viewed 1394 times
(gist)
or Ctrl+S https://youtu.be/XZkbu4ik83c
A_Perry_1984
Posts: 75
Joined: 07 Dec 2018, 12:08

Re: We want AHK for Linux!

10 Dec 2019, 09:36

The claim I hear often is that not enough Linux users would use AHK, and I just don't believe that. The problem I am seeing is based on the fact that advanced Linux users work with the console where there is less need for automation, but every Linux user still interacts with the desktop to a large degree and there are features in AHK that would make Linux even better to use. Lets also remember there are a significant amount of people that don't use the Linux console who would greatly benefit. In Linux you need a separate program for key strokes, a program for GUI's and so on. With AHK you can do it all, and even though Python lets you do a lot, you still need a bunch of different modules. If more Linux people had the opportunity to actually use AHK directly with the OS, I believe it would a game changer.

What if there was some kind of crowd funding to port it over? I would honestly contribute a good amount and I am pretty sure a lot of us would as well. There are a lot of us here who would love to get off of Windows once and for all.
SOTE
Posts: 910
Joined: 15 Jun 2015, 06:21

Re: We want AHK for Linux!

10 Dec 2019, 14:44

A_Perry_1984 wrote:
10 Dec 2019, 09:36
What if there was some kind of crowd funding to port it over?
I don't think crowd funding will be helpful. That could attract grifters, who might completely monetize the project into something commercial for themselves, swindle people, or not deliver. Throwing money at people is not always the answer, as it can be just people taking your money or wanting even more money later. Most likely it will take volunteers, like with most open source projects, that have the knowledge, willingness, and time to help. They create the software, because they will use it themselves, and will also let others use it. And they don't have to create it by themselves, hopefully other developers will contribute.

If money is involved, it's probably better in the form of donations, if the developer has setup a PayPal account for such and also wants it.
With AHK you can do it all, and even though Python lets you do a lot, you still need a bunch of different modules. If more Linux people had the opportunity to actually use AHK directly with the OS, I believe it would a game changer.
True. I think the AutoHotkey way is better for more people. A scripting language with a very small footprint (can use just AutoHotkey.exe), that's more specific to automation. The problem with Python is it has a lot of baggage, where you are unloading hundreds of megabytes of files on the disk, and doing lots of weirdness.

If people are going to go that route, and not develop a C++ interpreter for AutoHotkey on Linux. I always thought that C# or Object Pascal are better alternative languages. IronAHK, made in C#, runs on the Linux OS and macOS, but is collecting dust for some odd reason. Object Pascal has the well developed Lazarus IDE and Free Pascal, allowing it to create interpreters that run on Linux, Macs, and Androids. What many people don't know, is that Object Pascal can do just about whatever can be done with C/C++. There is already a project called WinAutoKey, which shows you can do what is done with AutoHotkey in a different programming language. But with that typed, restarting IronAHK seems the faster way, with so much code already done and it being able to run simple AutoHotkey scripts.
https://www.softpedia.com/get/Programming/Coding-languages-Compilers/IronAHK.shtml(IronAHK for Windows download)
https://github.com/Paris/IronAHK (IronAHK source code on GitHub)
Don't know if he's a member of the AHK community, but seems to have worked on a IronAHK-like project using C#
https://github.com/adunStudio/SOA (SOA : Spear of Adun; author appears to be Korean)

The other issue is that Lexikos has publicly stated he won't develop a version of AutoHotkey beyond C++ and Windows. So it's going to have to be some other developers willing to do it. I think users that want AutoHotkey on Linux and the macOS, are going to have start emailing developers and ask them to create a new fork or restart IronAHK.

Glad to see burque505 and SL5 collaborating, and they will probably need more developers to help them.
Last edited by SOTE on 11 Dec 2019, 05:17, edited 1 time in total.
A_Perry_1984
Posts: 75
Joined: 07 Dec 2018, 12:08

Re: We want AHK for Linux!

10 Dec 2019, 16:32

What exactly was the main reason for ending IronAHK development?

If I even had the brain for developing, I would already be working on it, but I'll gladly support developers any way I can.

Is it possible there exists some C++ to Pascal conversion programs? Also DLL's could be converted to .SO files etc?
SOTE
Posts: 910
Joined: 15 Jun 2015, 06:21

Re: We want AHK for Linux!

11 Dec 2019, 03:15

A_Perry_1984 wrote:
10 Dec 2019, 16:32
What exactly was the main reason for ending IronAHK development?
This and the other are hard questions. I will give what I know about it, but there might be more to the story than I know, in regards to both.

Chris, the original creator of AutoHotkey, originally handed over AutoHotkey leadership to a user named Polyethylene/Titan (went by both names, maybe more). Polyethylene/Titan was an advanced user/developer of AutoHotkey that created a number of scripts and contributed a lot. The original AHK Studio and IronAHK, among them.

When Polyethylene/Titan took over as leader, it appeared he behaved erratically, would leave for long periods, and got into destructive disputes. Because of neglecting the main AutoHotkey website, users broke away and started a new website (http://ahkscript.org). A dispute also started over which would be the official version of AutoHotkey, Lexikos's version AutoHotkey_L or Chris's original version AutoHotkey_Basic. It appears Polyethylene/Titan wanted AutoHotkey_Basic to be the official version and restarted, with IronAHK to be the alternative fork to AutoHotkey_Basic.

Polyethylene/Titan was asked by numerous members of the AHK community to hand over control of the main website back to other AHK members, who would do a better job of maintenance and upgrading (this is the present AutoHotkey Foundation LLC). Losing control of the website (and there were lots of harsh exchanges) appeared to have upset Polyethylene/Titan so much, that he stopped developing IronAHK. Though keep in mind he was not the only developer/contributor to the project (others helped with the code for Linux), but they mysteriously stopped too. An additional result of him losing control of the website and stopping development is that the AutoHotkey_L fork became the official version of AutoHotkey (which was/is still actively developed).

Luckily, Polyethylene/Titan created a very liberal license for IronAHK. Somewhat similar to a MIT license, so that others are free to contribute to and use the project. Despite what happened with Polyethylene/Titan, the work on IronAHK should arguably continue. Just like AHK Studio might have been originally created by him, Maestrith picked up the torch and created an improved and better version. So should this arguably become of IronAHK, where a newer and improved version should be made.
DLL's could be converted to .SO files etc?
This is trivial in Lazarus/Free Pascal or Delphi, for compiling projects to work on Windows or Linux. Both can cross-compile to different OSes, provided your original project was created in Object Pascal. Keep in mind that Lazarus/Free Pascal has a compatibility mode for Delphi, where Delphi doesn't have the reverse.

However, you can't use the WinAPI on Linux. Your code must not include anything specific to only the Windows OS, if you want to compile it for Linux. You may need to find a "Linux way" of accomplishing a particular task.
Is it possible there exists some C++ to Pascal conversion programs?
A number of C to Pascal converters exists (https://wiki.freepascal.org/C_to_Pascal). C++ is a bit more difficult beast, but there is a SWIG variation for Object Pascal/Delphi (http://www.fmxexpress.com/create-wrapper-interfaces-for-c-and-c-libraries-using-swig-with-delphi-support/). Note- Lazarus/Free Pascal have a Delphi compatibility mode setting. SWIG developers are a bit funky about including Object Pascal/Delphi in the main branch. There have been Object Pascal programmers that have written code to be included in the main branch of SWIG, which appears to keep being forgotten to be included.

SWIG and C# should be easier to work with. Overall, for AutoHotkey, there is a lot of C# usage, where Object Pascal is rarely ever mentioned on the boards. C++ is closer linguistically to C# (though Object Pascal is arguably easier to understand), and both supported by Microsoft, and there is IronAHK already. I do think an Object Pascal fork of AutoHotkey is quite possible (as WinAutokey shows), but it will probably be easier to find developers that can restart and continue development on IronAHK in C# and Visual Studio.
User avatar
nnnik
Posts: 4384
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: We want AHK for Linux!

11 Dec 2019, 07:31

In order for AHK to fully work on Linux we would have to ditch a lot of the current commands regarding window interactions and replace them with a more abstract layer.
Said abstract layer would allow us to write the same code in Windows and Linux to achieve the same thing.
However we would have to settle for a middle ground between Linux and Windows window automation and probably loose a lot of the extremly specific features we currently have for windows.

We would probably loose the ability to support automation for many windows since this is a very specific field and you need to be very specific to automate certain windows.
For example I don't think we could ever find an abstract equivalent to SendMessage - we would have to implement individual features that can be created by using SendMessage instead.
That would of course limit the functionality in that regard - e.g. How would one interact with a Scintilla control?
Users would probably just use something equivalent to DllCall with SendMessage - In turn said script would be impossible to use on Linux.
We would have to prevent that from happening excessively - for example by forcing the user to only use OS specific commands in certain sections and forcing the users to expose general interfaces to these sections.
That way another user has the chance to provide a similar replacement for the section for the other OS.

Of course that would completely change the language and overhaul it's current design.
Newbie friendliness would definitively be a thing of the past.
All scripts will have to be completely rewritten from scratch.
The amount of effort it would take is probably equivalent to a complete rewrite at which point calling ourselves AutoHotkey doesn't quite fit anymore.
Recommends AHK Studio
SOTE
Posts: 910
Joined: 15 Jun 2015, 06:21

Re: We want AHK for Linux!

11 Dec 2019, 08:41

nnnik wrote:
11 Dec 2019, 07:31
In order for AHK to fully work on Linux we would have to ditch a lot of the current commands regarding window interactions and replace them with a more abstract layer...

We would probably loose the ability to support automation for many windows since this is a very specific field and you need to be very specific to automate certain windows...

Of course that would completely change the language and overhaul it's current design...

Newbie friendliness would definitively be a thing of the past...

All scripts will have to be completely rewritten from scratch...
Nobody is saying that a Linux version of AutoHotkey has to be 100% compatible with the Windows version or that both versions must have exactly the same features. A subset of the AutoHotkey language on Linux, would likely satisfy many users. And when developers actually start working on a new AutoHotkey fork, let them figure it out. There is always a way to do something. Let them find out how many commands/functions can be preserved/be made similar, and work on strategies/innovations for those commands/functions that are more difficult.

The claim that "newbie friendliness would be gone" if a Linux version existed or that the Windows version must loose commands is not to be taken seriously. Hopefully, at some point there is going to be another fork of AutoHotkey or competing automation languages are going to have newer multi-OS versions that are more attractive. Forking is how AutoHotkey_L, AutoHotkey_H, and IronAHK came about in the first place. And I already linked to SOA's IronAHK-like project on GitHub. Hell, the reason AutoHotkey exists, is because Chris saw things differently from AutoIt developers.

The number of user views and requests for a Linux, macOS, and Android version of AutoHotkey is proportionally staggering. Since I've been on this website, it's been a constant drum beat of requests. I think it might be much better for AutoHotkey's future to be innovative and get ahead, versus get left behind.
Last edited by joedf on 11 Dec 2019, 12:28, edited 1 time in total.
Reason: minor moderation edits
swagfag
Posts: 3273
Joined: 11 Jan 2017, 17:59

Re: We want AHK for Linux!

11 Dec 2019, 09:03

I think nnnik is just trying to explain what the possible problems with creating a cross-platform fork of ahk are.

You could either come up with a reduced subset of ahk that works on windows, osx, linux and android or u can have a go at simultaneously developing and maintaining 4 forks for each platform, each with their own platform specific features.

no matter which option is chosen, the final product would not be AutoHotkey as we know it. and if one decided on platform specific abstraction, they would have to push the cross compatibility management onto the users, hence the user friendliness plummeting
Last edited by joedf on 11 Dec 2019, 12:31, edited 1 time in total.
Reason: minor moderation edits
SOTE
Posts: 910
Joined: 15 Jun 2015, 06:21

Re: We want AHK for Linux!

11 Dec 2019, 09:54

swagfag wrote:
11 Dec 2019, 09:03
come up with a reduced subset of ahk that works on windows, osx, linux and android
That's more than we have now. Presently we have zero versions of AutoHotkey that work on Linux, macOS, or Android despite frequent user requests (as IronAHK is collecting dust). Arguably better to have a subset of AutoHotkey Windows for Linux, than to have nothing at all.

And the limits of such a subset of AutoHotkey is unknown. If there was actually code, possibly such limits could be pushed from say 40% to 80%, because once many eyes are on a project people often come up with various kinds of solutions.
have a go at simultaneously developing and maintaining 4 forks for each platform, each with their own platform specific features.
Maybe, but again better than the nothing we have now. The Linux and the macOS are much closer to each other than they are to Windows. The macOS has a BSD/FreeBSD lineage, which means there are more options for porting/running applications between them. Android is built on top of a Linux kernel. Android phones can be made to run Linux applications. If an AutoHotkey Linux version was in existence, it could likely be made to run on Android phones with a few modifications, and possibly the macOS with a few more.
to push the cross compatibility management onto the users, hence the user friendliness plummeting
IronAHK is built on C#, and was not made sure it's 100% compatible with the AutoHotkey_L C++ interpreter, before building it. What the developer did, he built IronAHK first to be compatible with a subset of commands/functions.
Additionally, the AutoHotkey_L fork is not 100% compatible with AutoHotkey_Basic and neither will AutoHotkey_v2 be with AutoHotkey_v1.

If some developers create a new fork of AutoHotkey for Linux, the level of cross compatibility is up to them. If you are starting from a subset of commands/functions that can be made to work with both versions, you are already addressing the issue. And if they go the restart IronAHK route, they already have some code to move forward with, so are not starting from ground zero. If anything, it can be up to the Linux team to decide how compatible they need to be, while the AutoHotkey Windows C++ interpreter team continues onward.

Also the AutoHotkey Windows C++ interpreter source code is so big, it will be a while before the subset of commands/functions for Linux will reach a critical point where it even needs to worry about it.
Last edited by joedf on 11 Dec 2019, 12:34, edited 1 time in total.
Reason: minor moderation edits
User avatar
nnnik
Posts: 4384
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: We want AHK for Linux!

11 Dec 2019, 10:08

Topic locked for moderation review.
Recommends AHK Studio
User avatar
joedf
Posts: 7402
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

Re: We want AHK for Linux!

11 Dec 2019, 12:36

Topic unlocked again. This topic was locked temporarily by a team member due to fears that the discussion could overheat or get too personal.
Please note that in case this moderation advice gets ignored, this topic (and potential clone topics) could get perma-locked and/or personal consequences could follow.
If you should still have questions re this mod action(s), don't hesitate to PM me or another team member (answers can take a little time). But please no meta-discussions in this topic here.
Cheers :+1:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]
SOTE
Posts: 910
Joined: 15 Jun 2015, 06:21

Re: We want AHK for Linux!

11 Dec 2019, 12:46

I think we all are just passionate about discussing the subject, and don't think we have the intention to get vicious or personal. Hopefully we can be respectful of differences in opinion, and remember we share liking AutoHotkey in common.
guest3456
Posts: 2981
Joined: 09 Oct 2013, 10:31

Re: We want AHK for Linux!

11 Dec 2019, 14:46

well done mods :clap:

a previous topic about Linux got somewhat "heightened" so to speak:
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=25741

here's a response from Lexikos from yet another thread that pretty much sums it up:
lexikos wrote:
04 Jul 2016, 19:38
There may be some commands that wouldn't translate, but ultimately there's only one thing keeping AHK from going to Linux: lack of someone to do the work.

I don't use Linux. Even on Windows, I only work on AutoHotkey intermittently, and contributions by others are rare. It's already been more than 5 years since I started developing v2...

burque505
Posts: 1124
Joined: 22 Jan 2017, 19:37

Re: We want AHK for Linux!

11 Dec 2019, 16:38

Although I'm somewhat wary of even posting this, seeing how heated the discussions have become, I'm posting it anyway. If you don't like the post, please just ignore it. This is for information purposes only.

I haven't seen the project mentioned much, but sharpAHK is working well for me, and LucidMethod has made recent updates. (I made one small change several months ago and created a NuGet package for it - not updated to the latest version yet. I needed an "isReady() command in AutoHotkeyEngine.cs to return true or false, so I added it.)

The reason I mention this is that the project is in C#. Ergo, maybe a dotnet-core version would provide at least a subset of AHK functionality on Linux. I haven't tried to port it yet, but the portability reports are promising:

ApiReport:
apireport.PNG
apireport.PNG (15.36 KiB) Viewed 899 times
Portability:
portability.PNG
portability.PNG (13.82 KiB) Viewed 899 times
A conversion tool, try-convert is available. I gave it one-shot try and it bailed, perhaps because the project targets .NET 4.61, and Microsoft recommends retargeting the solution to 4.72+ first.. There's a Twitter thread on the topic that might help somebody.

Regards,
burque505
User avatar
joedf
Posts: 7402
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

Re: We want AHK for Linux!

11 Dec 2019, 17:12

@burque505 Wow, this is neat! First time I hear about sharpAHK :D

As a side note. Again, no one should feel pressure from anything here. If there's anything bothersome, please let me or anyone else in the staff know before posting. :+1:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 11 guests