Page 26 of 32

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 07 May 2022, 20:21
by Drugwash
An Edit field can react to changes through its g-label so theoretically the checks can be performed automatically when text is pasted - or typed - into the field.
It would be a pity not to have this functionality especially where navigating to certain paths can be somewhat difficult. But it's your call.

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 10 May 2022, 20:11
by RaptorX
Hi guys,

I just want to report on something that is happening with the latest version of Ahk2Exe and vscode extensions that use the compile funcitonality.

When using version Ahk2Exe v1.1.34.00_Beta_9c I was able to use Ctrl+Shift+F9 with vscode to compile a script without any prompts.
After Ahk2Exe v1.1.34.00a When using the above hotkey, I get the AHK2Exe window.

I took a quick look at the code and I dont see any obvious changes that might relate to that. Any info on why this might be happening?

Both Ahk2Exe v1.1.34.00a and Ahk2Exe v1.1.34.01 have the same issue, but reinstalling Ahk2Exe v1.1.34.00_Beta_9c fixes it.

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 10 May 2022, 21:17
by TAC109
@RaptorX Thanks for letting us know. This appears to be a bug in AutoHotkey v1.1.34+ and I have raised a bug report.

Cheers

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 12 May 2022, 18:13
by TAC109
@RaptorX This problem should be fixed in AutoHotkey v1.1.34.02.

Cheers

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 13 May 2022, 09:14
by RaptorX
Saw the update, will be testing soon. Thanks!

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 16 May 2022, 10:41
by JoeWinograd
Hi @TAC109,

I've been using ScriptGuard2 successfully with my 32-bit compiles for quite a while. I hadn't compiled in the last couple of weeks and when I tried today with 1.1.34.02, I received the following:

ScriptGuard2 failure.png
ScriptGuard2 failure.png (5.87 KiB) Viewed 4167 times

Nothing in my BinMod.exe /ScriptGuard2 statement has changed recently, so I decided to try with 1.1.34.01, which produced the same error, and then 1.1.34.00, which also produced the same error. I then tried 1.1.33.11, which worked perfectly (with no change to the BinMod.exe /ScriptGuard2 statement). So, the summary is that ScriptGuard2 fails in all 1.1.34 releases and works in 1.1.33.11, and probably all 1.1.33 releases, as I don't recall any prior failures. Please let me know if you can reproduce this problem and/or if I can do anything to help you troubleshoot it. Cheers, Joe

Edit: Another data point for you. The 1.1.33.11 compiler works with 1.1.34.02 AHK. To be clear, in a standard install, with 1.1.34.02 in the root of c:\Program Files\AutoHotkey\ and 1.1.33.11 in the subfolder c:\Program Files\AutoHotkey\Compiler\, I do not get the /ScriptGuard2 error. Regards, Joe

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 16 May 2022, 18:37
by TAC109
Hi @JoeWinograd

Unfortunately ScriptGuard is not totally compatible with AutoHotkey v1.1.34+. I’ve some plans to upgrade ScriptGuard to cater for the new facilities in v1.1.34 but these are not ready yet.

You can still use the current version of ScriptGuard with the latest AutoHotkey and Ahk2Exe, but you will need to use v1.1.33.11 of the appropriate *.bin file as the Base file for the compile. This should not cause a problem unless your script uses new or fixed facilities in the later versions of AutoHotkey.

Cheers

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 16 May 2022, 20:05
by JoeWinograd
Hi @TAC109,
Unfortunately ScriptGuard is not totally compatible with AutoHotkey v1.1.34+.
Thanks for confirming that.
I’ve some plans to upgrade ScriptGuard to cater for the new facilities in v1.1.34 but these are not ready yet.
When the upgrade is ready, I'll be happy to beta test it for you if you'd like.
You can still use the current version of ScriptGuard with the latest AutoHotkey and Ahk2Exe, but you will need to use v1.1.33.11 of the appropriate *.bin file as the Base file for the compile.
Thanks for letting me know that. Just tested on a 32-bit compile...worked perfectly!

Regards, Joe

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 30 May 2022, 04:48
by aaffe
hy Tac109, could you please have a look here?

viewtopic.php?f=6&t=16061&p=464996&hilit=ahk2exe#p464996

I would need to perform a post-build-step after the compiled exe really exists. Is this possible?

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 03 Jul 2022, 18:29
by TAC109
Update - 1.1.34.03a, 04 July 2022
  • AutoHotkey Version Info is removed from compiled .exe.
  • Apparently invalid Base files may optionally be used.
See this post for download details.

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 04 Jul 2022, 20:12
by TAC109
Update - 1.1.34.03b, 05 July 2022
  • Skip duplicate Base files by default.
See this post for download details.

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 04 Jul 2022, 21:05
by JoeWinograd
TAC109 wrote:Update - 1.1.34.03b, 05 July 2022
Hi TAC,
Will this release solve the problem of using ScriptGuard with AHK 1.1.34? Thanks, Joe

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 04 Jul 2022, 21:22
by TAC109
@JoeWinograd
No, sorry. The ScriptGuard enhancement will happen in BinMod, but it is still a way off yet.

Cheers

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 05 Jul 2022, 01:10
by JoeWinograd
OK, no worries, the work-around you provided is fine. Cheers, Joe

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 21 Jul 2022, 01:11
by toralf
I'm having problems to set the mainicon.
I tried the "custom Icon" option in the AHK2EXE GUI and the ;@Ahk2Exe-SetMainIcon directive.
In both cases the file still has the "green H" icon in the windows browser.
If I use Menu, Tray, Icon with the same ico file, the tray icon and the guis have the changed icon. Hence, the ico file works in general.
the ico file contains several different sized versions of the icon.

Are there any special requirements for the ico file for the mainicon?
Or
what am I doing wrong?

EDIT:
I tried it with a ahk file that only contains the ;@Ahk2Exe-SetMainIcon directive, and the resulting exe has the new icon in the windows explorer. Hence it should work in general.
I then checked the icons ind the exe with an old script of mine (IconViewer Light), and it shows that the exe has the new icons as their first group. In the file selection dialog of the IconViewer Light the exe also shows the new icon. But the exe still shows the "green H" in the windows Explorer. Is there a way to "refresh" the windows explorer?
When I change the destination file name to be a previously not existing file name the exe now has the new icon. :)
Hence, it seems to me that the icon is cached somewhere (registry?). Is there a way to reset/refesh this cache?

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 21 Jul 2022, 01:47
by TAC109
Yes, Windows caches the file icons when they are first read, and doesn’t detect when a file's icon has changed. If you reboot your computer, or log off then log on again the icons will be refreshed and the new icon will be shown. (I am not aware of any quicker method, sorry.)

Cheers

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 21 Jul 2022, 06:25
by jNizM
toralf wrote:
21 Jul 2022, 01:11
it seems to me that the icon is cached somewhere (registry?). Is there a way to reset/refesh this cache?
TAC109 wrote:
21 Jul 2022, 01:47
I am not aware of any quicker method

Code: Select all

EnvGet, LocalAppData, LocalAppData                                       ; get the %localappdata% path
RunWait taskkill /F /IM explorer.exe                                     ; stop all explorer.exe instances
FileDelete % LocalAppData "\Microsoft\Windows\Explorer\iconcache*.db"    ; delete the user's hidden IconCache.db files
RunWait Explorer.exe                                                     ; restart explorer

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 21 Jul 2022, 07:02
by toralf
Thanks ya'll,
May I suggest to add this info to the manual for ;@Ahk2Exe-SetMainIcon [IcoFile]. e.g.
Overrides the custom EXE icon used for compilation. (To change the other icons, see the AddResource example.) This directive may be overridden by an icon file specified in the GUI or CLI. The new icon might not be immediatly visible in the windows explorer if the compiled file existed before with a different icon. After a restart of the computer the new icon will be shown.
Another question: Would it be possible to add a ;@Ahk2Exe-Compress directive, to set the Compression if mpress or upx are available?

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 21 Jul 2022, 07:06
by toralf
In the compressed (mpress) file the manifest has the text name="AutoHotkey" is there a way to change this with BinAHK?

Re: Upcoming Ahk2Exe Changes (2022)

Posted: 21 Jul 2022, 09:25
by joedf
jNizM wrote:
21 Jul 2022, 06:25
toralf wrote:
21 Jul 2022, 01:11
it seems to me that the icon is cached somewhere (registry?). Is there a way to reset/refesh this cache?
TAC109 wrote:
21 Jul 2022, 01:47
I am not aware of any quicker method

Code: Select all

EnvGet, LocalAppData, LocalAppData                                       ; get the %localappdata% path
RunWait taskkill /F /IM explorer.exe                                     ; stop all explorer.exe instances
FileDelete % LocalAppData "\Microsoft\Windows\Explorer\iconcache*.db"    ; delete the user's hidden IconCache.db files
RunWait Explorer.exe                                                     ; restart explorer
+1

Other options to try as well:
https://superuser.com/a/499079/122864
ie4uinit.exe -show or ie4uinit.exe -ClearIconCache