I've reached a point where I need a feature that requires 1.1.34+, so can no longer compile with the 1.1.33.11 work-around. Do you have an ETA on a BinMod/ScriptGuard that is compatible with 1.1.34+? Thanks much, JoeTAC109 wrote:The ScriptGuard enhancement will happen in BinMod, but it is still a way off yet.
Upcoming Ahk2Exe Changes (2024)
- JoeWinograd
- Posts: 2213
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Upcoming Ahk2Exe Changes (2022)
Hi TAC,
Re: Upcoming Ahk2Exe Changes (2022)
@JoeWinograd
Still a lot more work to do, unfortunately. What is the v1.1.34+ enhancement you need?
Still a lot more work to do, unfortunately. What is the v1.1.34+ enhancement you need?
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
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
- JoeWinograd
- Posts: 2213
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Upcoming Ahk2Exe Changes (2022)
The ability of FileCopyDir to perform an un-zip, retaining the source folder/subfolder structure:TAC109 wrote:What is the v1.1.34+ enhancement you need?
viewtopic.php?f=76&t=103864&p=461551#p461574
There are other ways to do it, such as flyingDman's excellent code earlier in the thread or calling 7-Zip (7za.exe) via RunWait, but I like the idea of using the built-in FileCopyDir. Regards, Joe
Re: Upcoming Ahk2Exe Changes (2022)
Are there any reasons why you dont use the Shell.Application object?JoeWinograd wrote: ↑30 Sep 2022, 17:49The ability of FileCopyDir to perform an un-zip, retaining the source folder/subfolder structure:TAC109 wrote:What is the v1.1.34+ enhancement you need?
viewtopic.php?f=76&t=103864&p=461551#p461574
There are other ways to do it, such as flyingDman's excellent code earlier in the thread or calling 7-Zip (7za.exe) via RunWait, but I like the idea of using the built-in FileCopyDir. Regards, Joe
Code: Select all
zipDir := a_desktop "\uzip",
zipFile := "c:\path\to\a\Zipfile\Name.zip"
; Extract zip file to temporal folder
oShell := ComObjCreate("Shell.Application")
oDir := oShell.NameSpace(zipDir), oZipFile := oShell.NameSpace(zipFile)
oDir.CopyHere(oZipFile.Items)
Last edited by RaptorX on 13 Oct 2022, 12:44, edited 1 time in total.
Projects:
AHK-ToolKit
AHK-ToolKit
Re: Upcoming Ahk2Exe Changes (2022)
@RaptorX That's what the code that flyingDman's function uses that @JoeWinograd mentioned.
Re: Upcoming Ahk2Exe Changes (2022)
oops, sorry.
haha.
what would be the reason not to use that code?
is simple and works great for many other situations.
Projects:
AHK-ToolKit
AHK-ToolKit
- JoeWinograd
- Posts: 2213
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Upcoming Ahk2Exe Changes (2022)
As I noted at that other thread, I tested flyingDman's code and it worked perfectly. I have no qualms about using the code...the only reason not to use it is a preference for using built-in features when available...as long as they do the job well, which, in this case, the updated FileCopyDir does. Regards, JoeRaptorX wrote:what would be the reason not to use that code?
Re: Upcoming Ahk2Exe Changes (2022)
Com objects are as built-in as it comes when you are using AHK v1.1.33+ because Shell.Application is a built-in object that comes with windows.JoeWinograd wrote: ↑12 Oct 2022, 23:05As I noted at that other thread, I tested flyingDman's code and it worked perfectly. I have no qualms about using the code...the only reason not to use it is a preference for using built-in features when available...as long as they do the job well, which, in this case, the updated FileCopyDir does. Regards, JoeRaptorX wrote:what would be the reason not to use that code?
You are just accessing it using the also built-in command ComObjCreate.
If you dont count com objects as built in Im not sure if there is another way to do what you want except running cmd's xCopy.
Code: Select all
Run cmd /q xCopy.exe sourcePath destPath
Projects:
AHK-ToolKit
AHK-ToolKit
- JoeWinograd
- Posts: 2213
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Upcoming Ahk2Exe Changes (2022)
Yes, I count COM objects as built-in and use them often. It's fair to say that I misspoke when I cited "a preference for using built-in features", as everything in flyingDman's Unz function is certainly "built-in". It's just that the utter simplicity of the FileCopyDir command being able to do the un-zip automatically really struck me. Now, if only there were a comparable zip...
Re: Upcoming Ahk2Exe Changes (2022)
yeah, that would be nice: zip and unzip commands in ahk.JoeWinograd wrote: ↑13 Oct 2022, 13:01Yes, I count COM objects as built-in and use them often. It's fair to say that I misspoke when I cited "a preference for using built-in features", as everything in flyingDman's Unz function is certainly "built-in". It's just that the utter simplicity of the FileCopyDir command being able to do the un-zip automatically really struck me. Now, if only there were a comparable zip...
Projects:
AHK-ToolKit
AHK-ToolKit
Re: Upcoming Ahk2Exe Changes (2022)
Update - 1.1.34.04b, 17 Oct 2022 Note:- Includes an important bug fix for the Ahk2Exe updater.
- 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.
Last edited by TAC109 on 29 Oct 2022, 20:57, edited 1 time 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
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
Re: Upcoming Ahk2Exe Changes (2022)
Update - 1.1.34.04c, 30 Oct 2022
- Fixed quoted #Include for v2.
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
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
Re: Upcoming Ahk2Exe Changes (2022)
Update - 1.1.36.01, 04 Dec 2022
- Remove default CompanyName from generated .exe.
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
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
Re: Upcoming Ahk2Exe Changes (2022)
Suggestion: A #WarnCompile/Log options
Perhaps I missed it, but perhaps some sort of warning/log/hints could be added?
Example could be the use of A_AhkPath which I tend to use basic menu AutoHotkey icons, which works on regular scripts, and compiled scripts as long as AutoHotkey is installed which may not be the case when you distribute the compiled script (it looks for AutoHotkey.exe for the icons)
Same would be for other icons that are not FileInstalled or added as resource to the compiled scripts.
Perhaps there are other things that could trip up those who don't compile often.
It is of course user error in essence, but a "warning log" of some sorts could potentially be useful.
Perhaps I missed it, but perhaps some sort of warning/log/hints could be added?
Example could be the use of A_AhkPath which I tend to use basic menu AutoHotkey icons, which works on regular scripts, and compiled scripts as long as AutoHotkey is installed which may not be the case when you distribute the compiled script (it looks for AutoHotkey.exe for the icons)
Same would be for other icons that are not FileInstalled or added as resource to the compiled scripts.
Perhaps there are other things that could trip up those who don't compile often.
It is of course user error in essence, but a "warning log" of some sorts could potentially be useful.
Re: Upcoming Ahk2Exe Changes (2022)
Thanks for your suggestion, but I believe that this comes under the heading of the script author testing the compiled script in the environment under which the generated .exe is required to run. The compilation process does not examine details of the script apart from a few specialised items such as 'FileInstall', '#Include', and compiler directives, etc. so your suggestion would be a major change to Ahk2Exe. You may be able to write a separate script analyser which checks for the conditions that you mentioned.
Cheers
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
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
Re: Upcoming Ahk2Exe Changes (2022)
Update - 1.1.36.02a, 09 Dec 2022
- PostExec: added 'Program not found' error message.
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
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
Re: Upcoming Ahk2Exe Changes (2022)
If you compile with an EXE file as the base, A_AhkPath will be the script itself and the same icons will be present in the file. There is no need to rely on an externally installed copy of AutoHotkey (which I think would defeat one of the main points of compiling). If you compile with a BIN file, you can use A_ScriptFullPath instead, but the large .ahk file icon is omitted.ahk7 wrote:Example could be the use of A_AhkPath which I tend to use basic menu AutoHotkey icons, which works on regular scripts, and compiled scripts as long as AutoHotkey is installed
Re: Upcoming Ahk2Exe Changes (2022)
Nice idea, perhaps someone will run with it.
I learned about the new options when I (finally) understood why a compiled script wasn't working for someone (all I got back was "needs AutoHotkey to work" which puzzled me). But got it working now.
Re: Upcoming Ahk2Exe Changes (2022)
Only as info / hint:
UPX has released a (two) new version after more than two years.
Homepage: https://upx.github.io/
Github: https://github.com/upx/upx
Download Page: https://github.com/upx/upx/releases
UPX has released a (two) new version after more than two years.
Homepage: https://upx.github.io/
Github: https://github.com/upx/upx
Download Page: https://github.com/upx/upx/releases
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: Upcoming Ahk2Exe Changes (2022)
Update - 1.1.36.02b, 22 Dec 2022
- Only skip */ if within a block comment.
- Accept FileInstall names containing commas.
- Show warning if compression fails.
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
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