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

Re: Upcoming Ahk2Exe Changes (2022)

22 Dec 2022, 21:52

Update - 1.1.36.02c, 23 Dec 2022
  • Fix @Ahk2Exe-Keep, broken by last commit.
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: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2023)

29 Jan 2023, 19:06

Update - 1.1.36.02d, 30 Jan 2023
  • Ahk2Exe has not changed since Ahk2Exe v1.1.36.02c.
  • BinMod has been updated.
(It is not necessary to update Ahk2Exe.)
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
Brujah4
Posts: 19
Joined: 11 Feb 2023, 03:27

Re: Upcoming Ahk2Exe Changes (2023)

11 Feb 2023, 12:13

Strange bug?

When I update to/install BinMod 1.1.36.02d v2023.01.30 over the update function of Ahk2Exe, the resultung BinMod.exe gets a custom icon I used for my own script. Does anybody have an explanation for this behavior? It's no problem, I think, but I'm interested in having BinMod.exe with the usual icon.

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

Re: Upcoming Ahk2Exe Changes (2023)

11 Feb 2023, 21:02

Update - 1.1.36.02e, 12 Feb 2023
  • Ahk2Exe: Avoid compressing BinMod.
  • BinMod: Use default icon.
  • BinMod: Save and restore optional registers.
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: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2023)

11 Feb 2023, 21:16

Brujah4 wrote:
11 Feb 2023, 12:13
Strange bug?
Should be fixed in 1.1.36.02e.

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
Brujah4
Posts: 19
Joined: 11 Feb 2023, 03:27

Re: Upcoming Ahk2Exe Changes (2023)

13 Feb 2023, 04:43

TAC109 wrote:
11 Feb 2023, 21:16
Should be fixed in 1.1.36.02e.
Nice. I tested it. I installed BinMod.exe through the update function from Ahk2Exe.exe. Now BinMod.exe has the default icon. But if I delete it, in the msgbox by windows it still shows my custom icon.

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

Re: Upcoming Ahk2Exe Changes (2023)

13 Feb 2023, 17:30

Brujah4 wrote:
13 Feb 2023, 04:43
But if I delete it, in the msgbox by windows it still shows my custom icon.
I’m not sure which MsgBox you are referring to. If Ahk2Exe -> 'File' -> 'Refresh Windows icons' doesn’t fix it, you will need to supply more details.

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: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2023)

13 Feb 2023, 19:13

Update - 1.1.36.02e1, 14 Feb 2023
  • (Ahk2Exe: no changes.)
  • BinMod: Ensure ScriptGuard2 handles big .exe's.
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
Brujah4
Posts: 19
Joined: 11 Feb 2023, 03:27

Re: Upcoming Ahk2Exe Changes (2023)

14 Feb 2023, 03:10

TAC109 wrote:
13 Feb 2023, 17:30
I’m not sure which MsgBox you are referring to. If Ahk2Exe -> 'File' -> 'Refresh Windows icons' doesn’t fix it, you will need to supply more details.
Ok, refreshing the windows icons fixed it. Thank you.

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

Re: Upcoming Ahk2Exe Changes (2023)

28 Mar 2023, 19:04

Update - 1.1.36.02e2, 29 Mar 2023
  • (Ahk2Exe: no changes.)
  • BinMod: File handling is now fully Unicode compatible.
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: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2023)

01 Apr 2023, 20:16

Update - 1.1.36.02e3, 02 Apr 2023
  • (Ahk2Exe: no changes.)
  • BinMod: Align mcode for faster processing.
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
jNizM
Posts: 3201
Joined: 30 Sep 2013, 01:33
Contact:

Re: Upcoming Ahk2Exe Changes (2023)

13 Apr 2023, 01:13

[AHK] v2.0.18 | [WIN] 11 Pro (23H2) | [GitHub] Profile
User avatar
JoeWinograd
Posts: 2241
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Upcoming Ahk2Exe Changes (2023)

13 Apr 2023, 10:51

jNizM wrote:UPX v4.0.2
Hi jNizM,
That UPX version has been available via the GUI compiler since at least 2-April:
viewtopic.php?p=515559#p515553
Regards, Joe
User avatar
JoeWinograd
Posts: 2241
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Upcoming Ahk2Exe Changes (2023)

13 Apr 2023, 10:58

Hi @TAC109 (or anyone else who wants to jump in),

I use the AddResource compiler directive to replace the standard icons:

Code: Select all

;@Ahk2Exe-AddResource icon160.ico,160
;@Ahk2Exe-AddResource icon206.ico,206
;@Ahk2Exe-AddResource icon207.ico,207
;@Ahk2Exe-AddResource icon208.ico,208
I then use those icons for system tray icons, for example:

Code: Select all

Menu,Tray,Icon,%A_ScriptFullPath%,-160
Question: Is it possible to use the compiler directives to include more than those four icon files in the executable, such that I can have a large number of icons available for Menu,Tray,Icon commands (without having to install the .ICO files via my Setup.exe installer, which is what I do now)? Thanks, Joe
User avatar
jNizM
Posts: 3201
Joined: 30 Sep 2013, 01:33
Contact:

Re: Upcoming Ahk2Exe Changes (2023)

14 Apr 2023, 00:50

JoeWinograd wrote:
13 Apr 2023, 10:51
jNizM wrote:UPX v4.0.2
Hi jNizM,
That UPX version has been available via the GUI compiler since at least 2-April:
viewtopic.php?p=515559#p515553
Regards, Joe
thx for the tip. didnt read both topics
[AHK] v2.0.18 | [WIN] 11 Pro (23H2) | [GitHub] Profile
TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2023)

14 Apr 2023, 18:41

@JoeWinograd
Have you tried and had problems adding extra icons?
How are you expecting to use these additional icons?

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
JoeWinograd
Posts: 2241
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Upcoming Ahk2Exe Changes (2023)

14 Apr 2023, 20:02

TAC109 wrote:Have you tried and had problems adding extra icons?
Haven't tried. Don't know how to do it beyond the four AddResource directives for 160, 206, 207, and 208.
How are you expecting to use these additional icons?
As system tray icons. For example, here's the tray context menu from one of my programs:

CapsLock context menu.png
CapsLock context menu.png (9.43 KiB) Viewed 4263 times

What I'm doing now is including all the icon files in my installer (a Setup.exe file) that has the EXE from Ahk2Exe and all other supporting files necessary for installation. But I'm wondering if I can include many icon files in the EXE from Ahk2Exe, not just the four from the AddResource directives (160, 206, 207, 208). Regards, Joe
User avatar
Drugwash
Posts: 853
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Upcoming Ahk2Exe Changes (2023)

15 Apr 2023, 11:18

JoeWinograd wrote:
14 Apr 2023, 20:02
But I'm wondering if I can include many icon files in the EXE from Ahk2Exe, not just the four from the AddResource directives (160, 206, 207, 208).
You can include as many as you want, theoretically as long as no resource number overlaps. For that you'd have to first make a list of all resource numbers already used in the binary file for any and all types of resources. And if I recally correctly there is a certain limit to the resource numbers but I doubt you would ever exceed it.

If you have many icons to add you may be better off building an image strip (or more if you want different sizes), add that/those as bitmap resources, then at runtime split the image strip(s) into imagelist(s) and retrieve your icons from there. But that may be a tad complicated.
Part of my AHK work can be found here.
User avatar
JoeWinograd
Posts: 2241
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Upcoming Ahk2Exe Changes (2023)

15 Apr 2023, 13:12

Drugwash wrote:You can include as many as you want, theoretically as long as no resource number overlaps.
Good to know!
you'd have to first make a list of all resource numbers already used in the binary file for any and all types of resources
Do you know of an easy/automated way to do that? I just did it manually by scanning the EXE's treeview with ResourceHacker, but I'm worried about missing some and causing overlaps. Btw, I tested the Ahk2Exe AddResource directive with resource number 5001 and it worked fine.
But that may be a tad complicated.
Sounds like it. :)

Thanks for the ideas...much appreciated! Regards, Joe
User avatar
Drugwash
Posts: 853
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Upcoming Ahk2Exe Changes (2023)

15 Apr 2023, 14:37

JoeWinograd wrote:
15 Apr 2023, 13:12
Do you know of an easy/automated way to do that?
Off the top of my head no, way too rusty with Windows generally, but I seem to remember there was some EnumResource API or something similar. A very quick search returned EnumResourceTypes() and EnumResourceNames(). However they need to be run in conjunction with other API in order to produce the desired result.
This topic in the old forums might be of help, unless there is something newer available. It's a starting point though.
You're welcome. ;)
Part of my AHK work can be found here.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: submeg and 132 guests