My experience porting AHK scripts to Linux.

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: My experience porting AHK scripts to Linux.

Post by SOTE » 02 Sep 2022, 05:07

burque505 wrote:
27 Aug 2022, 11:21
@SOTE, nice post, thank you!
@burque505
You are welcome. There is also bit more, involving Tinku99 and others (dealing with WINE and Linux), so put that in an update of the previous post.

MindCaged
Posts: 19
Joined: 19 Jun 2014, 12:33

Re: My experience porting AHK scripts to Linux.

Post by MindCaged » 05 Feb 2024, 11:08

I don't have time at the moment, but I need to try out the 1.0.48.05 on wine thing, I've tried some of the native ports and they've been lacking key basic functions that I use all the time. I know I tried running the latest v1 installer and it errored out, I'll have to try again. I don't care if I have to rewrite a few things for an older version as long as the basic functionality is there.

Also, the how to run autohotkey on winetricks video seems to be gone.

User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: My experience porting AHK scripts to Linux.

Post by Drugwash » 05 Feb 2024, 21:48

Unless you set your WINE to run in Windows 9x/ME mode by default you don't have to install the old Basic/1.0 version of AHK. The 1.1 version runs fine and would allow you to run the relatively more recent scripts too - except for those meant specifically for AHK 2.0+. But you can always deploy the 1.0 version from the zip package alongside the 1.1 installed version and then call the scripts through specially crafted shortcuts or launchers in order to choose which AHK version to launch them with.

The 1.1 installer does seem to crash at some point but the installation gets done ultimately. Some time ago I had devised a small change/addition to the official installer that could have safely deployed AHK but the GUI got a bit too crowded and not very intuitive for a new user so I just put the project aside.

Major problem is the actual WINE version. I am still using 5.14 here in Mint 19.2 as any later versions introduced a regression in regard to processing certain elements - difficult to describe - but I had to add a few native libraries and perform individual settings for certain applications in the WINE Control Panel. Depending on what distribution of Linux you're currently running you may have a higher choice of WINE; for Mint 19/Ubuntu 18.04 the max version is 8.5. Tried that in PlayOnLinux - which may be an alternative for you too - and it seemed to work better in certain regards but some applications didn't like the sandbox.

All in all it's quite tricky getting WINE properly set up and it also has its own limitations - as in hotkeys will NOT work, ever - but for a few application it could be enough. It does require time for a proper set up though. Good luck!
Part of my AHK work can be found here.

Post Reply

Return to “Other Utilities & Resources”