Page 1 of 32

Upcoming Ahk2Exe Changes (2024)

Posted: 03 Jun 2019, 23:21
by TAC109
Installation

This new Ahk2Exe 1.1.37.01c1 version includes bug fixes to the version included with AutoHotkey v1.1.37.01 (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.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)


Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 08:51
by joedf
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/

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 10:22
by elModo7
I had one for this purpose but this seems like an upgrade to that one.
Thanks for posting!

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 12:12
by Delta Pythagorean
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?

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 12:31
by JoeWinograd
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

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 12:36
by JoeWinograd
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

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 12:47
by JoeWinograd
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

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 13:35
by JoeWinograd
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

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 15:56
by robodesign
Very nice work!

I hope to see UPX added as well. I like it.

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 23:03
by TAC109
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

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 23:28
by guest3456
so the new changes are in the 'edge' branch?

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 04 Jun 2019, 23:49
by TAC109
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.

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 05 Jun 2019, 00:59
by joedf
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.

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 05 Jun 2019, 19:01
by TAC109
@joedf Cheers!

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 05 Jun 2019, 22:28
by tmplinshi
Thanks!

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 07 Jun 2019, 19:13
by Randy31416
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.)

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 07 Jun 2019, 20:27
by TAC109
@Randy31416 Thanks for your report. I’ll fix this in the next beta version.

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 07 Jun 2019, 20:47
by joedf

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 07 Jun 2019, 23:05
by TAC109
Update 08 June 2019-
  • Added 'LegalTrademarks' property.
  • Added UPX .exe compression option.
  • Cleanup a temp file left behind.

Re: Upcoming Ahk2Exe Changes (2019)

Posted: 07 Jun 2019, 23:07
by TAC109
@joedf No worries, Joe. :thumbup: