Upcoming Ahk2Exe Changes (2024)

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

Upcoming Ahk2Exe Changes (2024)

Post by TAC109 » 03 Jun 2019, 23:21

Installation

This new Ahk2Exe 1.1.37.02a0 version includes bug fixes to the version included with AutoHotkey v1.1.37.02 (see 'Updates' below).

If updating from a version earlier than v1.1.34.04b please check the important bug fix for v1.1.34.04b (see 'Updates' below).

If you have Ahk2Exe version 1.1.34.03c or later installed, run Ahk2Exe and go to 'Help' -> 'Check for Updates'. You can update directly from there.

Otherwise, download from this location. Next, unblock the downloaded .zip file by right-clicking it, selecting 'Properties', and ticking or pressing 'Unblock' (near the bottom). 'OK' out. Install by copying the Ahk2Exe.exe file from the downloaded zip to the Compiler sub-directory under where AutoHotkey has been installed (Usually C:\Program Files\AutoHotkey\Compiler\).

Note that the download may be flagged as containing a virus, but rest assured that it does not. Users can help with this by notifying their anti-virus provider that this Ahk2Exe download is being flagged as a false positive. See this post for details of how to do this for a number of popular anti-virus providers. Thanks.

Note that updates to BinMod are also reported here. BinMod is used to implement part of the ScriptGuard package, which can be used to protect compiled scripts from decompilation.

Bugs

Please report any problems to this thread. (Also report successful use as well!)

Updates:-


1.1.37.02a0, 17 May 2024
  • Get Mpress more reliably in the Updater.
  • Fix addition of new base file in the GUI.
1.1.37.01c1, 16 March 2024
  • Send parameter errors to stdout/stderr if in /Silent mode.
  • Prevent compression when compiling Ahk2Exe.
1.1.37.01c0, 12 February 2024
  • Rationalise detection of major AHK version.
  • Enhance for MS Store version.
1.1.37.01c, 30 September 2023
  • Fix Base compiler directive not fully expanding built-in variables.
  • Fix "Save script as' for v1 & v2.
  • Add diagnostics to 'Syntax check' error message.
1.1.37.01b, 21 August 2023
  • Fix: compile of new .exe failed in 1.1.37.01a.
1.1.37.01a, 20 August 2023
  • Avoid copying compiled .exe permissions from temp.
  • Fix 'Save script as' when Base compiler directive selected.
  • Local help now shows v2 if Base compiler directive selected.
1.1.37.00a, 05 July 2023
  • Ahk2Exe: Add sub-version check for base file *.exe allowed. (Compile v2.1 scripts correctly.)
    Edit: Fixed download link.
1.1.36.02f2, 05 June 2023
  • Ahk2Exe: (No changes).
  • BinMod: Fix error message.
1.1.36.02f1, 31 May 2023
  • Ahk2Exe: (No changes).
  • BinMod: Add new parameter /ScriptGuard2pss ('Permit /script switch').
1.1.36.02f, 30 April 2023
  • Ahk2Exe: Allows 64-bit interpreter use on 64-bit Windows.
1.1.36.02e3, 02 Apr 2023
  • (Ahk2Exe: no changes.)
  • BinMod: Align mcode for faster processing.
1.1.36.02e2, 29 Mar 2023
  • (Ahk2Exe: no changes.)
  • BinMod: File handling is now fully Unicode compatible.
1.1.36.02e1, 14 Feb 2023
  • (Ahk2Exe: no changes.)
  • BinMod: Ensure ScriptGuard2 handles big .exe's.
1.1.36.02e, 12 Feb 2023
  • Ahk2Exe: Avoid compressing BinMod.
  • BinMod: Use default icon.
  • BinMod: Save and restore optional registers.
1.1.36.02d, 30 Jan 2023
  • Ahk2Exe has not changed since Ahk2Exe v1.1.36.02c.
  • BinMod has been updated.
1.1.36.02c, 23 Dec 2022
  • Fix @Ahk2Exe-Keep, broken by last commit.
1.1.36.02b, 22 Dec 2022
  • Only skip */ if within a block comment.
  • Accept FileInstall names containing commas.
  • Show warning if compression fails.
1.1.36.02a, 09 Dec 2022
  • PostExec: added 'Program not found' error message.
1.1.36.01, 04 Dec 2022
  • Remove default CompanyName from generated .exe.
1.1.34.04c, 30 Oct 2022
  • Fixed quoted #Include for v2.
1.1.34.04b, 17 Oct 2022
  • Fixed the Ahk2Exe updater ('Check for Updates' menu option) assigning incorrect permissions to updated programs.
    To fix any existing incorrect permissions:
    • It is first necessary to use the Ahk2Exe updater to update Ahk2Exe to version 1.1.34.04b or later.
    • Then use the Ahk2Exe updater to re-update Ahk2Exe, plus any other programs in the list which have been updated or installed by a version of the updater earlier than 1.1.34.04b.
    • (Apologies for the inconvenience.)
  • Ahk2Exe updater help button now opens this Ahk2Exe forum post to allow browsing of updates, etc.
  • Changed how sub-version is set for local compiles of Ahk2Exe.
  • Improved comma handling in the 'Debug' directive.
  • A directive reference to 'A_PriorLine' just after '#Include' now sees the last line of the included file.
  • The 'Cont' directive can now be 'Nop'ed.
  • Added the directive variable 'A_BasePath'.
  • Included a higher resolution logo.

(Older fixes)

Last edited by TAC109 on 16 May 2024, 19:38, edited 117 times 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
User avatar
joedf
Posts: 9097
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Upcoming Ahk2Exe Changes (2019)

Post by joedf » 04 Jun 2019, 08:51

Great work! :+1:
I think I'll add a directive for Compression (MPress and maybe UPX) which will do nothing if they are unavailable.
Also, perhaps we can put this under ahkscript/ or autohotkey/
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
elModo7
Posts: 221
Joined: 01 Sep 2017, 02:38
Location: Spain
Contact:

Re: Upcoming Ahk2Exe Changes (2019)

Post by elModo7 » 04 Jun 2019, 10:22

I had one for this purpose but this seems like an upgrade to that one.
Thanks for posting!
User avatar
Delta Pythagorean
Posts: 628
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Re: Upcoming Ahk2Exe Changes (2019)

Post by Delta Pythagorean » 04 Jun 2019, 12:12

Oh! I've been waiting for this kind of thing for a while now!
So, does this require the script to be compiled via command line? Or can the executables work through the compiler nonetheless?

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat

User avatar
JoeWinograd
Posts: 2241
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Upcoming Ahk2Exe Changes (2019)

Post by JoeWinograd » 04 Jun 2019, 12:31

Hi TAC109,

I just tested it with these directives:

;@Ahk2Exe-SetName
;@Ahk2Exe-SetDescription
;@Ahk2Exe-SetVersion
;@Ahk2Exe-SetOrigFilename
;@Ahk2Exe-SetCompanyName
;@Ahk2Exe-SetCopyright

Worked perfectly...great job! Thanks for your efforts on this...much appreciated! Regards, Joe
User avatar
JoeWinograd
Posts: 2241
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Upcoming Ahk2Exe Changes (2019)

Post by JoeWinograd » 04 Jun 2019, 12:36

Hi Delta,

> So, does this require the script to be compiled via command line? Or can the executables work through the compiler nonetheless?

Works fine through the GUI compiler as long as you've copied the new Ahk2Exe.exe file to the Compiler subfolder (which is C:\Program Files\AutoHotkey\Compiler for a standard install). Regards, Joe
User avatar
JoeWinograd
Posts: 2241
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Upcoming Ahk2Exe Changes (2019)

Post by JoeWinograd » 04 Jun 2019, 12:47

Hi joedf,

> a directive for Compression (MPress and maybe UPX) which will do nothing if they are unavailable

Nice idea! Another possibility on the same front is to change the Use MPRESS check-box to three radio buttons: Use MPRESS, Use UPX, Do not compress. That way, both compressors can be in the Compiler folder and it is a single mouse click to set which way to go on any particular compile. Or maybe a Compress drop-down (like the Base File one) with the three choices. Regards, Joe
User avatar
JoeWinograd
Posts: 2241
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Upcoming Ahk2Exe Changes (2019)

Post by JoeWinograd » 04 Jun 2019, 13:35

Hi TAC109,
There's one other field in Properties that I set in my NSIS installers that would be a nice addition to your compiler Directives: LegalTrademarks. Thanks, Joe
robodesign
Posts: 941
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Upcoming Ahk2Exe Changes (2019)

Post by robodesign » 04 Jun 2019, 15:56

Very nice work!

I hope to see UPX added as well. I like it.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

Post by TAC109 » 04 Jun 2019, 23:03

JoeWinograd wrote:
04 Jun 2019, 13:35
Hi TAC109,
There's one other field in Properties that I set in my NSIS installers that would be a nice addition to your compiler Directives: LegalTrademarks. Thanks, Joe
I’ll look at adding this over the next few days.

Also the Mpress/Upx options on the Gui.

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
guest3456
Posts: 3477
Joined: 09 Oct 2013, 10:31

Re: Upcoming Ahk2Exe Changes (2019)

Post by guest3456 » 04 Jun 2019, 23:28

so the new changes are in the 'edge' branch?

TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

Post by TAC109 » 04 Jun 2019, 23:49

Yes, under TAC109 on GitHub. My plan is to test it here and add some small enhancements I have in mind before merging into Master in the near future.
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
joedf
Posts: 9097
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Upcoming Ahk2Exe Changes (2019)

Post by joedf » 05 Jun 2019, 00:59

Good ideas... I'll let TAC109 do his thing, i'll fork it later, possibly under ahkscript or authotkey and add some of those features.
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

Post by TAC109 » 05 Jun 2019, 19:01

@joedf 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
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: Upcoming Ahk2Exe Changes (2019)

Post by tmplinshi » 05 Jun 2019, 22:28

Thanks!
Randy31416
Posts: 58
Joined: 15 Jan 2014, 19:09

Re: Upcoming Ahk2Exe Changes (2019)

Post by Randy31416 » 07 Jun 2019, 19:13

The compiler leaves behind a scratch file in the user temp directory. The file name is of the form "~temp82727923.tmp" with the number changing on each compile. This scratch file is actually the compiled program -- it is identical to the compiled program created in the directory with the source. Since I make many many errors, and therefore recompile and recompile and recompile, thereby creating many many many versions of these temp files in the temp directory, it would be nice if the compiler cleaned it up before closing. (There would then be less evidence of my errors.)
TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

Post by TAC109 » 07 Jun 2019, 20:27

@Randy31416 Thanks for your report. I’ll fix this in the next beta version.
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
joedf
Posts: 9097
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Upcoming Ahk2Exe Changes (2019)

Post by joedf » 07 Jun 2019, 20:47

Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

Post by TAC109 » 07 Jun 2019, 23:05

Update 08 June 2019-
  • Added 'LegalTrademarks' property.
  • Added UPX .exe compression option.
  • Cleanup a temp file left behind.
Last edited by TAC109 on 28 Sep 2019, 22:28, edited 5 times 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: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

Post by TAC109 » 07 Jun 2019, 23:07

@joedf No worries, Joe. :thumbup:
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
Post Reply

Return to “Scripts and Functions (v1)”