Upcoming Ahk2Exe Changes (2024)

Post your working scripts, libraries and tools for AHK v1.1 and older
lexikos
Posts: 9560
Joined: 30 Sep 2013, 04:07
Contact:

Re: Upcoming Ahk2Exe Changes (2022)

Post by lexikos » 01 May 2022, 00:05

TAC109 wrote:
03 Jun 2019, 23:21
The help file included in the .zip has information on the new parameters and compiler directives. It may be installed by copying over the existing AutoHotkey.chm file where AutoHotkey has been installed.
Would you consider splitting it out into a separate download in future releases, or omitting it entirely?
  • The help file is 4 times the compressed size of Ahk2Exe.exe.
  • The help file targets a specific AutoHotkey version (v1.1.33.10 for the latest GitHub release).
  • Ahk2Exe documentation is also included in the AutoHotkey v2 documentation, although for whatever version existed at the time of release.
  • The latest documentation is readily available online (although it might not always be the case that the latest beta documentation is present in both AutoHotkey v1 & v2 stable branches).

Instead of bundling an Ahk2Exe binary with AutoHotkey v2, I am planning to include an automated download-and-install function (which might be extended to other tools). I can easily just delete the CHM file, but it seems wasteful.

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by TAC109 » 01 May 2022, 19:28

Update - 1.1.34.00_Beta_9c, 02 May 2022
  • Excludes _UIA.exe files from the Base file list.
  • Help file is removed from download, as updates are now in v1.1.33.11+.
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: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2022)

Post by TAC109 » 01 May 2022, 19:39

@lexikos
I normally only include the help file if there is new/changed information that is not in the main AutoHotkey download (as happened with v1.1.33.10). If this situation arises in the future I'll keep the help file separate, as requested.

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

lexikos
Posts: 9560
Joined: 30 Sep 2013, 04:07
Contact:

Re: Upcoming Ahk2Exe Changes (2022)

Post by lexikos » 01 May 2022, 20:15

Makes sense. Thanks.

lexikos
Posts: 9560
Joined: 30 Sep 2013, 04:07
Contact:

Re: Upcoming Ahk2Exe Changes (2022)

Post by lexikos » 02 May 2022, 01:43

When the path to a script's directory is too long to fit in the Edit control, it's impossible to see which file is currently selected in the GUI. I would suggest one or both of the following:
  • Make the Edit control read-only, not disabled. That way, the user can manually drag the selection back and forward to read the entire path. It also allows the path to be copied.
  • Use the following combination of messages to ensure the right end of the text is visible, by moving the (currently invisible) insertion point there.

    Code: Select all

    SendMessage 0xB1, -1, -1, Edit1, Ahk2Exe ; EM_SETSEL
    SendMessage 0xB1, 0, -1, Edit1, Ahk2Exe
I suppose this applies to the source, destination and icon fields.

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by Drugwash » 02 May 2022, 04:43

The window is resizable, the user can at any time enlarge it to view the full contents of the Edit fields (provided the length of the path text is not larger than display width). Making the Edit controls as read-only would only be useful for copying the text.

Perhaps a more useful feature would be to save the last window size (and position?)
Part of my AHK work can be found here.

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by TAC109 » 02 May 2022, 05:01

@lexikos As @Drugwash says, allowing the Ahk2Exe window to be resizable was added a while ago to solve this problem. Is this solution acceptable?
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

lexikos
Posts: 9560
Joined: 30 Sep 2013, 04:07
Contact:

Re: Upcoming Ahk2Exe Changes (2022)

Post by lexikos » 02 May 2022, 23:03

I didn't realize it was resizable, but still think it would be better with my suggestions. Is there some objection to these trivial changes?

This came up because I could only see the directory in both boxes. Is it not more useful to show the filename by default? I don't need to see the whole path.

I think it's strange to use disabled edit controls.

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by Drugwash » 03 May 2022, 11:59

Suggestions and the reasons behind them are sensible so there should be no problem in having them implemented.

Just that sometimes, maybe in rare cases - no idea - the user could be dealing with much diverse paths than a single directory tree - possibly multiple drives/partitions. In that case it could be more useful to see at a first glance which root drive/directory they are using rather than the file name.

Anyway, the ability to copy a path should be available in any case, and having the window keep a randomly chosen size between sessions could solve the filename/path visibility once and for all without the need to select-scroll the text or other tricks.
Part of my AHK work can be found here.

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by TAC109 » 05 May 2022, 21:48

@lexikos @Drugwash

I’ve changed the Disabled to ReadOnly on the 3 edit fields so that they are scrollable, and can be copied. These fields had been set to Disabled from the first upload to GitHub.

I experimented with the EM_SETSEL change but I couldn’t get it to work cleanly when resizing the Ahk2Exe window. It would often cut off part of the leading/trailing characters of the path\file name even though there was plenty of room in the field, so I decided not to implement this.

The Save button now also remembers the window width.

These changes are now in GitHub, but I haven’t produced a beta download. Maybe there will be a v1.1.34.01 soon?

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

lexikos
Posts: 9560
Joined: 30 Sep 2013, 04:07
Contact:

Re: Upcoming Ahk2Exe Changes (2022)

Post by lexikos » 05 May 2022, 22:49

Thanks.

I'm not expecting another v1 release any time soon. I think it would be better if Ahk2Exe was released on its own schedule (at your discretion), although future v1 releases will still bundle the current "master" (unless you want me to change that).

Version numbers and labeling (e.g. beta) can be whatever you decide.

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Upcoming Ahk2Exe Changes (2022)

Post by joedf » 05 May 2022, 23:23

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by TAC109 » 06 May 2022, 00:04

@lexikos
I think it is better to carry on compiling and including Ahk2Exe with AutoHotkey releases, as you have in the past.

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by TAC109 » 06 May 2022, 02:15

Update - 1.1.34.00a, 06 May 2022
  • Allows Source, Destination, and Icon fields to be scrolled and copied.
  • 'Save' button also preserves window width.
  • Remembers Icon directory for later use.
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 (2022)

Post by Drugwash » 06 May 2022, 11:09

Thank you for implementing the changes. If i may, a couple minor adjustments:
1. The Source field could be editable because the user could have a path in clipboard that could be pasted directly without having to browse. File existance would have to be validated.
2. Saving the window size might be better done in an OnExit routine as the user might not want to preserve the rest of the current options.
Also, it should appear as an option in the menu, for those who wouldn't want to preserve window size.

Additionally and optionally, the Convert button could have its text in bold as a visual hint, mostly for new users, as to what the final/most important action to take would be. Especially in a bland, flat interface. (thankfully Wine in Linux can still load a real theme and look normally)
Part of my AHK work can be found here.

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by TAC109 » 06 May 2022, 18:54

I feel that most of these suggestions are just feature creep for a minor part of Ahk2Exe, and would be little used. However I’ll bold the 'Convert' button in the next release.

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

lexikos
Posts: 9560
Joined: 30 Sep 2013, 04:07
Contact:

Re: Upcoming Ahk2Exe Changes (2022)

Post by lexikos » 06 May 2022, 19:27

One can paste a full path into the filename field of the browse dialog (not everyone knows this). On the other hand, Ahk2Exe already handles the case where the source file doesn't exist: it tells you the file can't be opened. This can be seen if you delete, move or rename the file after selecting it. Source could simply be made read-write without any additional validation (but either way is fine with me).

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by TAC109 » 06 May 2022, 19:42

Additionally, certain GUI fields accept drag and drop (Source, Destination, Icon, Base).
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)

Post by Drugwash » 06 May 2022, 20:45

lexikos wrote:
06 May 2022, 19:27
One can paste a full path into the filename field of the browse dialog [...]
Indeed, but it would still require two extra clicks: one on the Browse button to open the dialog and one on the Open button to validate the path. A simple Ctrl+V might be much more handy (and quicker) to some users.
TAC109 wrote:
06 May 2022, 19:42
Additionally, certain GUI fields accept drag and drop [...]
While that is a useful feature, in some situations it may not work - such as in Linux/Wine, for example.
TAC109 wrote:
06 May 2022, 18:54
I feel that most of these suggestions are just feature creep for a minor part of Ahk2Exe, and would be little used.
It also depends on user habits besides the feature subset available in certain environments.
TAC109 wrote:
06 May 2022, 18:54
I’ll bold the 'Convert' button in the next release.
Thank you, that should prove a nice and useful visual anchor for the entire window.
Part of my AHK work can be found here.

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

Re: Upcoming Ahk2Exe Changes (2022)

Post by TAC109 » 07 May 2022, 19:29

@Drugwash
A simple Ctrl+V might be much more handy (and quicker) to some users.
It might seem that this change to the Source field processing would be trivial, but in fact there are underlying checks made on the source file when the path\name is supplied to Ahk2Exe, to determine if the file contains a Base or Bin compiler directive. This can possibly result in adjustments to the Base File drop-down and Embedded Resource ID fields in the GUI. That’s part of the reason I’ve decided not to implement this.

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

Post Reply

Return to “Scripts and Functions (v1)”