Upcoming Ahk2Exe Changes (2024)

Post your working scripts, libraries and tools for AHK v1.1 and older
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2021)

23 Sep 2021, 15:57

Thanks for confirming fix!

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2021)

28 Sep 2021, 18:40

1.1.34.00_Beta_6, 29 September 2021
  • Fixed dropped destination on GUI not recognised.
  • Fixed format of completion message.
See this post for download details.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2021)

29 Sep 2021, 18:22

1.1.34.00_Beta_7, 30 September 2021
  • Naked Bin file should be relative to Compiler folder.
See this post for download details.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2021)

09 Oct 2021, 20:41

1.1.34.00_Beta_8, 10 October 2021
  • Fixes GUI Base defaults handling.
  • Fixes /gui /in can get blank entry in Base files list.
See this post for download details.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2021)

13 Dec 2021, 17:47

1.1.34.00_Beta_9, 14 December 2021
  • Shows early status events in GUI.
  • Shows that the '(default)' base file is a .bin in GUI.
See this post for download details.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Upcoming Ahk2Exe Changes (2021)

07 Feb 2022, 13:28

Since a few versions there's something wrong with this script. When trying to compile with a bin it goes into a loop of 'auto-including functions called from a library' until it runs out of iterations or memory or something I forgot, and errors out.
The Temp folder gets filled with dozens if not hundreds of temporary files:
~Ahk2Exe~WASP 0.0.7.1~ilib~3142392949746.tmp
~Ahk2Exe~WASP 0.0.7.1~ilib~3142708805368.tmpE
I could only compile that particular script with 1.1.32.00. The earliest at hand higher than that is 1.1.33.10 and it too errors out like 1.1.34.00 beta9.

The script uses old-school FileInstall to incorporate copies of itself and of its dependencies in order to provide the original source code if/when required. That may offer a clue as to what's happening.
There are no compilation directives in that script.

BTW, it's been a long time since I wanted to say: it always leaves temporary files behind in Temp. Can this be fixed? (running on Wine in Linux, if it matters)
Part of my AHK work can be found here.
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2021)

07 Feb 2022, 14:19

@Drugwash
Good to hear from you!

It would be a great help if you could post a script and library that demonstrates the compilation problem.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Upcoming Ahk2Exe Changes (2021)

07 Feb 2022, 14:33

Hi, nice to be back albeit unsure for how long. Life is extremely tough for me lately.

Here's the script with all its dependencies. Please note that it's partly broken, it only works correctly when compiled with the ANSI binary. I've been trying these days to port it to Unicode but can't figure out how to load the old databases that use the Central European codepage. The script has been developed in Win98SE years ago and it used to work fine back then.
WASP0071_source.7z
(227.45 KiB) Downloaded 130 times
Part of my AHK work can be found here.
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2022)

07 Feb 2022, 21:11

Update - 1.1.34.00_Beta_9a, 08 February 2022
  • Fixed bug with FileInstall of ahk script.
See this post for download details.

@Drugwash Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2022)

07 Feb 2022, 22:12

@Drugwash

Recent versions of Ahk2Exe should clean up temporary files when the compile finishes. If you still have problems with temp files remaining (other than after an Ahk2Exe crash) let me know.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Upcoming Ahk2Exe Changes (2022)

08 Feb 2022, 15:09

Thank you, this version fixes the FileInstall issue.
After compilation and closing the Ahk2Exe application there remains a temporary file in Temp:
~Ahk2Exe~WASP 0.0.7.1~ilib~4079280364097.tmp (3 bytes)
It only contains the Unicode BOM: 0xEF 0xBB 0xBF

Can't say if it's a Wine-specific issue or something else. Usually my scripts clean up after themselves in the same environment.
Part of my AHK work can be found here.
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2022)

08 Feb 2022, 19:05

Update - 1.1.34.00_Beta_9b, 09 February 2022
  • Ensure work files are deleted in all environments.
  • Format status line for FileInstall correctly.
See this post for download details.
Last edited by TAC109 on 08 Feb 2022, 22:38, edited 1 time in total.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2022)

08 Feb 2022, 19:08

@Drugwash
Let me know if this one cleans up the work files.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Upcoming Ahk2Exe Changes (2022)

09 Feb 2022, 05:36

Yes, this version does clean up temporary files. Well done, thank you!
Part of my AHK work can be found here.
User avatar
JoeWinograd
Posts: 2179
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Upcoming Ahk2Exe Changes (2022)

09 Feb 2022, 15:11

Hi @TAC109,
Fwiw, a quick note to let you know that 1.1.34.00_Beta_9b is working perfectly here. I tested it on a large script where I just counted 15 ;@Ahk2Exe- statements...no problems! Thanks for all your effort on this excellent tool during the past 2.5 years. Regards, Joe
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2022)

09 Feb 2022, 15:31

@JoeWinograd Thanks for the conformation!
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
Sam_
Posts: 146
Joined: 20 Mar 2014, 20:24

Re: Upcoming Ahk2Exe Changes (2022)

05 Apr 2022, 21:14

So I am trying to compile an AHK_L script via batch script. I was using the version of ahk2exe that came the latest release of AHK_L, but was getting this warning:

Code: Select all

ahk2exe version 1.1.33.10
---------------------------
Ahk2Exe Warning
---------------------------
Warning: AutoHotkey could not be located!

Auto-includes from Function Libraries and any 'Obey' directives will not be processed.

Press 'OK' to continue, or 'Cancel' to abandon.
---------------------------
OK   Cancel   
---------------------------
The compile syntax I am using is

Code: Select all

"C:\AutoHotkey\Compiler\Ahk2Exe.exe" /in "D:\Program Files\GitHub Projects\PS-BAM\PS BAM.ahk" /out "D:\Program Files\GitHub Projects\PS-BAM\PS BAM.exe" /base "D:\Program Files\GitHub Projects\PS-BAM\tmp.bin" /compress 0
I then updated to the latest version of ahk2exe I found on Github (version 1.1.34-TEST+ge02b563d) and am now getting this error:

Code: Select all

---------------------------
Ahk2Exe Error
---------------------------
Error: Not a recognised /base file:
"D:\Program Files\GitHub Projects\PS-BAM\tmp.bin"

Command Line Parameters:

Ahk2Exe.exe
	 [/in infile.ahk]
	 [/out outfile.exe]
	 [/icon iconfile.ico]
	 [/base AutoHotkeySC.bin]
	 [/resourceid #1]
	 [/compress 0 (none), 1 (MPRESS), or 2 (UPX)]
	 [/cp codepage]
	 [/silent [verbose]]
	 [/gui]
---------------------------
OK   
---------------------------
ahk2exe didn't used to be so damn whiny. "tmp.bin" is an AHK "Unicode 32-bit.bin" or "Unicode 64-bit.bin" edited via batch script with Resource Hacker and is perfectly legal and valid. Essentially the same build process worked with older versions of ahk2exe. What am I doing wrong?
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2022)

06 Apr 2022, 00:52

@sam_ Could you send me a copy of your "tmp.bin" file, please. This will help me to see how this check is failing.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
Sam_
Posts: 146
Joined: 20 Mar 2014, 20:24

Re: Upcoming Ahk2Exe Changes (2022)

06 Apr 2022, 06:28

TAC109 wrote:
06 Apr 2022, 00:52
@sam_ Could you send me a copy of your "tmp.bin" file, please. This will help me to see how this check is failing.

Cheers
Sorry if I was a bit snappy yesterday. It was a long day...
Here you go. I've included the AHK script that builds them. Note that this build process predates the introduction of the compiler directives.
PS-BAM Compiler.zip
(972.05 KiB) Downloaded 116 times
Edit: I tried ahk2exe v1.1.33.04 with the same tmp.bin files and it worked just fine with no warnings or errors.
TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2022)

06 Apr 2022, 22:53

@Sam_ No worries.

(The first warning is not expected to re-occur with recent Ahk2Exe betas.)

You have changed the file version of the .bin 'base' file being used for the compile. With recent changes, Ahk2Exe now uses the file version of the selected 'base' file to determine the version of the script being compiled. It will reject base file versions less than 1.1.00.00 with the error you reported, as this indicates an AutoHotkey Basic .bin file which is not supported. (The last version of AutoHotkey Basic was 1.0.48.05.) In addition, the high order version number of the base file affects how Ahk2Exe processes the script, as there are some handling differences depending on whether the script is seen as version 1 or 2.

In future versions of AutoHotkey (1.1.34.00+ and v2 betas+) the AutoHotkey*.exe itself can be used as the base file for a compile, and so the base file version will be even more important to Ahk2Exe.

For these reasons I would suggest that the method of compiling your script should be changed. You could probably make use of compiler directives to achieve the same result, or you could apply your Resource Hacker changes to the compiled .exe instead of the base file.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: JoeWinograd, TOTAL and 135 guests