Hey there. I'm new to this language, and I am also a new Linux user. One thing I really miss is AHK. I really think you guys should make this awesome language work on Linux too. I did actually try it with WINE once (converted an ahk to exe), which didn't work. It's obviously a big project, but I really want to see it.
Ooh, the WINE thing gives me an idea. What if you partnered with WINE? They know what they're doing. Maybe they could add a thing that lets you use AHK? I dunno. Whatever. I just really wanna see that. Thanks!
We want AHK for Linux!
We want AHK for Linux!
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it
Oh also try and explain stuff well if I need it
Re: We want AHK for Linux!
In the short term I would look at
https://pyautogui.readthedocs.io/en/latest/index.html or http://robotjs.io/
I think there was another purely python implementation but I can't find it again.
long term hopefully something emerges
https://pyautogui.readthedocs.io/en/latest/index.html or http://robotjs.io/
I think there was another purely python implementation but I can't find it again.
long term hopefully something emerges
-
- Posts: 9
- Joined: 18 Dec 2018, 16:27
Re: We want AHK for Linux!
If there were an AHK-like for *nix it would be a separate project. Also it would probably be tied to a specific window manager, XWindows is about as generic as you could get but for any advanced features you'd have to tie it to GNOME, KDE, etc. each of which would be their own project. That would be years of work for a project that most Linux users would probably not even want to use. The ubiquity of the command line diminishes interest in any hotkey-like programs, as most Linux users would use a combination of shell scripts, command-line programs, and aliases to achieve the same functionality you get from AHK.
I don't see why AHK would not run under WINE. You should try installing AHK with WINE and then run an AHK script with that installation, instead of trying to run a compiled script.
I don't see why AHK would not run under WINE. You should try installing AHK with WINE and then run an AHK script with that installation, instead of trying to run a compiled script.
Re: We want AHK for Linux!
@Hampoon, this is a topic of some interest to me, although I haven't recently pursued it.
AutoHotkey reportedly did run under Wine about 8 years ago and again as recently as 2015 (both with a Platinum rating). See this post. Unfortunately, I haven't been able to duplicate these results yet, although I have the same Linux Mint (17.1 Rebecca, x86_64 installed as one of the "Platinum" testers (the other used Ubuntu 5.04).
I tried with newer Wine versions without success. I could compile AutoHotkeyX (as it was called), but the binaries always crashed. The version of AHK reportedly used was 1.0.48, which can be grabbed here and other places . The Wine version used by the latest successful tester was 1.7.42; the "Hoary" user reported Wine 1.35.
There have been reports that newer Ubuntus (including the Mint version I use) have trouble with 32-bit Wine binaries, but unfortunately I stopped my investigations after trying many workarounds with newer Wine versions and ultimately failing with Wine 1.8 as well. I never did install 1.7.42.
I hope you have luck with it, and if you do, please share the results of your success
Regards,
burque505
AutoHotkey reportedly did run under Wine about 8 years ago and again as recently as 2015 (both with a Platinum rating). See this post. Unfortunately, I haven't been able to duplicate these results yet, although I have the same Linux Mint (17.1 Rebecca, x86_64 installed as one of the "Platinum" testers (the other used Ubuntu 5.04).
I tried with newer Wine versions without success. I could compile AutoHotkeyX (as it was called), but the binaries always crashed. The version of AHK reportedly used was 1.0.48, which can be grabbed here and other places . The Wine version used by the latest successful tester was 1.7.42; the "Hoary" user reported Wine 1.35.
There have been reports that newer Ubuntus (including the Mint version I use) have trouble with 32-bit Wine binaries, but unfortunately I stopped my investigations after trying many workarounds with newer Wine versions and ultimately failing with Wine 1.8 as well. I never did install 1.7.42.
I hope you have luck with it, and if you do, please share the results of your success
Regards,
burque505
Re: We want AHK for Linux!
I'm of the present opinion that a possibly better way to get AutoHotkey on Linux, is to have a transpiler (source to source compiler) be made. Where AutoHotkey source code, not the C++ code of the interpreter, but the code of the script in the AutoHotkey language is translated to Pascal.
My reasoning on this is:
1) Pascal has the Free Pascal Compiler and can do cross-compiling
You can cross-compile Pascal to Windows, Linux, macOs, iOS, or Android.
2) Oddly, there is a lot of "syntax" or "linguistic" compatibility between the AutoHotkey language and Pascal.
3) Automation libraries and functions in Pascal, that can be used by a AutoHotkey to Pascal Transpiler
There appears to already be a lot of work done in this area by various Pascal programmers, who have even already made equivalent Automation commands similar to those in AutoIt and AutoHotkey in Pascal. In addition, you can translate various C or C++ libraries or functions to Pascal, and there appears to be a number of ways to do that. To include some tricks at the compiler level and directly linking libraries.
4) AutoHotkey Scripts could compile directly to Pascal binaries (after being "translated" via transpiler), that can run on different OSes.
Note- Mostly automation related commands would possibly need extra functions and libraries, where Flow Control (If, Else, Loop, etc...) or GUI syntax is already present in Pascal and simply needs to be "translated" to their corresponding equivalent.
Lastly, maybe an AutoHotkey Automation Application for Linux versus full transfer of the AutoHotkey C++ interpreter to Linux. Look at Pulover’s Macro Creator. It's an automation application that uses the AutoHotkey interpreter and language, but does not try to do everything. Possibly an Automation application that does various things in Linux and Android, using a subset of the AutoHotkey language and syntax (and augmented with Pascal), without it being a full cross over of the C++ interpreter and every AutoHotkey command of the Windows version.
My reasoning on this is:
1) Pascal has the Free Pascal Compiler and can do cross-compiling
You can cross-compile Pascal to Windows, Linux, macOs, iOS, or Android.
2) Oddly, there is a lot of "syntax" or "linguistic" compatibility between the AutoHotkey language and Pascal.
3) Automation libraries and functions in Pascal, that can be used by a AutoHotkey to Pascal Transpiler
There appears to already be a lot of work done in this area by various Pascal programmers, who have even already made equivalent Automation commands similar to those in AutoIt and AutoHotkey in Pascal. In addition, you can translate various C or C++ libraries or functions to Pascal, and there appears to be a number of ways to do that. To include some tricks at the compiler level and directly linking libraries.
4) AutoHotkey Scripts could compile directly to Pascal binaries (after being "translated" via transpiler), that can run on different OSes.
Note- Mostly automation related commands would possibly need extra functions and libraries, where Flow Control (If, Else, Loop, etc...) or GUI syntax is already present in Pascal and simply needs to be "translated" to their corresponding equivalent.
Lastly, maybe an AutoHotkey Automation Application for Linux versus full transfer of the AutoHotkey C++ interpreter to Linux. Look at Pulover’s Macro Creator. It's an automation application that uses the AutoHotkey interpreter and language, but does not try to do everything. Possibly an Automation application that does various things in Linux and Android, using a subset of the AutoHotkey language and syntax (and augmented with Pascal), without it being a full cross over of the C++ interpreter and every AutoHotkey command of the Windows version.
Last edited by SOTE on 25 Dec 2018, 05:49, edited 1 time in total.
equivalent for WindowsTitle - WindowsClass?
BTW is a Linux equivalent exist ? for
- WindowsTitles
- WindowsClass
- clipboard (nice to have)
- Send command (nice to have)
?
if that's the case it will be really interesting for me to think about working under Linux too.
- WindowsTitles
- WindowsClass
- clipboard (nice to have)
- Send command (nice to have)
?
if that's the case it will be really interesting for me to think about working under Linux too.
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: We want AHK for Linux!
A window manager is a part of the OS that handles the display of windows and uis in general.
In windows there is only one Window manager.
Linux has several window managers.
In windows there is only one Window manager.
Linux has several window managers.
Recommends AHK Studio
Re: We want AHK for Linux!
It appears that there are command line options or tools to find this out, which could then possibly be fed to an automation tool, regardless of the Window manager used or that there are various ways to determine this despite the use of different Window Managers.
https://unix.stackexchange.com/question ... le-changes(Window Title Changes In Linux/Unix)
https://unix.stackexchange.com/question ... mmand-line(Get windows' titles using command line; Linux/Unix)
https://unix.stackexchange.com/question ... le-changes(Window Title Changes In Linux/Unix)
https://unix.stackexchange.com/question ... mmand-line(Get windows' titles using command line; Linux/Unix)
Re: We want AHK for Linux!
https://github.com/sl5net/AutoHotKey4Linux
# AutoHotKey4Linux version 0.00000001 Alpha
AutoHotKey wrapper, for using AutoHotKey in Linux
using AutoKey, AutoHotKey, wine
You need to install first:
wine for Linux and
AutoHotKey and
AutoKey for Linux
# AutoHotKey4Linux version 0.00000001 Alpha
AutoHotKey wrapper, for using AutoHotKey in Linux
using AutoKey, AutoHotKey, wine
You need to install first:
wine for Linux and
AutoHotKey and
AutoKey for Linux
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: We want AHK for Linux!
@SL5, I look forward to trying this out.
Can you please list the version of 'wine' you use, the AutoHotkey version you use, and which version of AutoKey you use?
It would be useful to know what Linux distro you use as well - wine versions seem to vary quite a bit among them.
Thanks very much.
Regards,
burque505
Can you please list the version of 'wine' you use, the AutoHotkey version you use, and which version of AutoKey you use?
It would be useful to know what Linux distro you use as well - wine versions seem to vary quite a bit among them.
Thanks very much.
Regards,
burque505
Re: We want AHK for Linux!
Logbook of a last successful test.burque505 wrote: ↑20 Nov 2019, 09:40@SL5, I look forward to trying this out.
Can you please list the version of 'wine' you use, the AutoHotkey version you use, and which version of AutoKey you use?
It would be useful to know what Linux distro you use as well - wine versions seem to vary quite a bit among them.
Thanks very much.
Regards,
burque505
https://github.com/sl5net/AutoHotKey4Linux/commit/988525369dfe4591dbbe4e231308fb181cd5f9a1
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: We want AHK for Linux!
Thanks!
That should get me started.
Regards,
burque505
Code: Select all
wine-4.18
autokey-gtk 0.95.7
Manjaro Linux 18.1.3
Regards,
burque505
Re: We want AHK for Linux!
Great I recomand using this: https://github.com/sl5net/AutoHotKey4Linux/blob/master/read_key_title_class_from_cllipboard_v3.ahkburque505 wrote: ↑20 Nov 2019, 12:47Thanks!That should get me started.Code: Select all
wine-4.18 autokey-gtk 0.95.7 Manjaro Linux 18.1.3
Regards,
burque505
BTW i searching an editor in linux. ahk-studio dont run and VS code maybe but not an my machine at the moment.
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: We want AHK for Linux!
Maybe people should revisit IronAHK. It looks to be the cleanest solution and there is already a significant amount of code. And there seems to be a lot of C# and AutoHotkey interactions over the years, so a fully C# (C family language) solution shouldn't be that much of a leap.
IronAHK website on wayback (https://web.archive.org/web/20131213195521/http://www.ironahk.net/)
IronAHK on GitHub- https://github.com/Paris/IronAHK
It appears that for the last version of IronAHK, people were running it on Linux and Macs. It definitely appeared to be usable on Windows.
IronAHK website on wayback (https://web.archive.org/web/20131213195521/http://www.ironahk.net/)
IronAHK on GitHub- https://github.com/Paris/IronAHK
It appears that for the last version of IronAHK, people were running it on Linux and Macs. It definitely appeared to be usable on Windows.
Re: We want AHK for Linux!
i visited it but not tested. may there is a misunderstanding.
AutoHotKey4Linux is just a Wraper to normal AutoHotKey ( https://github.com/sl5net/AutoHotKey4Linux/blob/master/README.md ).
Thanks we/i should look of its helpful to install it at the same time. may it helps AutoHotKey4Linux. Every solution is welcomeSOTE wrote: ↑22 Nov 2019, 09:53... IronAHK website on wayback (https://web.archive.org/web/20131213195521/http://www.ironahk.net/)
IronAHK on GitHub- https://github.com/Paris/IronAHK
... people were running it on Linux and Macs ..."
At the moment the keystrokes arrive at the Autohotkey like this: Key.esc key = 'k' key = Key.ctrl etc. ( <AutoKey:active_title= ...,active_class=..,press_key=Key.ctrl> <AutoKey:active_title= ...,active_class=..,release_key=Key.ctrl> )
Maybe someone wants to write a converter now?
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: We want AHK for Linux!
@SL5 Hey, so is it possible to use AHK in linux? To be honest AHK is the only think I miss since I switched from Windows. I really wish that there would be a alternative/similar thing in linux too.
Re: We want AHK for Linux!
Actually, I do not have the time. but it is not difficult for you to do it yourself ==> https://github.com/sl5net/AutoHotKey4Linux/blob/master/read_key_title_class_from_cllipboard_v3.ahk#L41 . Or you pay me a few on Freelancer so i could do it little fast/earlier? You just have to parse the keystrokes that arrive as a string into AutoHotkey. I already described that a bit. I'm also very keen on getting freelancers to get some good reviews right now.
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: We want AHK for Linux!
In theory, using IronAHK should be possible still. There is a downloadable .msi for IronAHK which works. Both 64-bit and 32-bit versions are available. The documentation is sparse and confusing, but some things work. If I can make it to a Linux box this weekend I'll try to compile it. Problems with that have been reported
Here's an example script after installation on Win7 Pro 64-bit:
Here's an example script after installation on Win7 Pro 64-bit:
Code: Select all
Gui("Add", "Edit", "w400 h400")
gui("Show")
return
Re: We want AHK for Linux!
Okay great then you we could maybe use both together? Iron and ahk4linux? Or can iron even read the window names and read keyboard without the help of Python? Or you only mix it together with the Python Part. Is it better to install Iron than the normal Autohotkey over wine?burque505 wrote: ↑28 Nov 2019, 12:54In theory, using IronAHK should be possible still. ... If I can make it to a Linux box this weekend I'll try to compile it. Problems with that have been reported
Here's an example script after installation on Win7 Pro 64-bit:edit.JPGCode: Select all
Gui("Add", "Edit", "w400 h400") gui("Show") return
What is the advantage of using Iron instead of the normal Autohotkey? What can Iron what Autohotkey can not do about wine?
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: No registered users and 16 guests