Fixed download link in first post.
See this post for download details.
Upcoming Ahk2Exe Changes (2024)
Re: Upcoming Ahk2Exe Changes (2021)
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 (2021)
Updated the first post to include a description of the Base file search algorithm used.
See this post for details.
See this post for 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
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 (2021)
@TAC109
Just wanted to report a beautiful success with compiling my first AHK v2 script in beta1.
I'll keep testing and post if I find something wonky.
EDIT: I like the interface update very functional.
Just wanted to report a beautiful success with compiling my first AHK v2 script in beta1.
I'll keep testing and post if I find something wonky.
EDIT: I like the interface update very functional.
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: Upcoming Ahk2Exe Changes (2021)
@TheArkive
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 (2021)
@lexikos just to confirm, does v1.1.33.10 include the latest Ahk2Exe or would it be the next release? I remember something about the AHK-release scripts auto pull and build the latest master branch. If so, then we have the new /silent switch in, since about 2 days ago.
https://github.com/AutoHotkey/Ahk2Exe/pull/77
If so, maybe we can update the docs to include it? @TAC109 @Ragnar
https://github.com/AutoHotkey/Ahk2Exe/pull/77
If so, maybe we can update the docs to include it? @TAC109 @Ragnar
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]
Re: Upcoming Ahk2Exe Changes (2021)
@joedf
Documentation changes are coming . Although this version is designed to work with AutoHotkey v1.1.34+ it is backwards compatible.
You may notice I included an ability to allow shrinkage of the GUI, which is something you were interested in a while back.
Cheers
Documentation changes are coming . Although this version is designed to work with AutoHotkey v1.1.34+ it is backwards compatible.
You may notice I included an ability to allow shrinkage of the GUI, which is something you were interested in a while back.
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 (2021)
@TAC109 very neat, that's great to hear! Thanks.
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]
Re: Upcoming Ahk2Exe Changes (2021)
1.1.33.10, 29 August 2021
- Added optional '/Silent' parameter to redirect all CLI error messages to stderr or stdout.
- Added optional '/ResourceID' parameter and ';@Ahk2Exe-ResourceID' compiler directive.
- Added optional 'Embedded Resource ID' field to the Gui (see 'Embedded Scripts' in the help for more information).
- Added ability to include additional scripts as separate resources in the generated .exe using the ';@Ahk2Exe-AddResource' compiler directive.
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 (2021)
Awesome!
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: Upcoming Ahk2Exe Changes (2021)
Code: Select all
;@Ahk2Exe-UpdateManifest 0, , , 1
;@Ahk2Exe-UpdateManifest 1, , , 1
If I run the resulting exe i get:
Re: Upcoming Ahk2Exe Changes (2021)
Your executable has to obey the rules for UIAccess. See here for more information.
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 (2021)
1.1.34.00_Beta_2, 09 September 2021
- Make start-up search for qualifying .bin's & .exe's more efficient.
- Improve CLI error checking and error messages.
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 (2021)
RCDATA behavior Change since 1.33.10 breaks existing projects
sadly i can't use the new Ahk2Exe (1.33.10 or 1.1.34.00_Beta_2) with my ahk-projects
where I don't use a flat directory structure, but have e.g. resources in subfolders, such as
Projectdir\MainFile.ahk
+ Icons\*.ico
+ Lib\*.ahk
to prevent a cleanup procedure in the compiled exe for removing embedded/extracted resources on ExitApp:
i use teadrinker's fantastic HBitMapFromResource - method:
this is now broken.
to reproduce:
run provided script once to 'install' sample.ico and icons\sample2.ico and check the inteded appearance!
compile script with Ahk2Exe < 1.33.10
run compiled script -> appearance of compiled script: as uncompiled script = OK!
examine compiled script with reshacker.exe
RCDATA contains
>AUTOHOTKEY SCRIPT<
SAMPLE.ICO
ICONS\SAMPLE2.ICO
compile script with Ahk2Exe >= 1.33.10
run compiled script -> Sample2.ico won't show up
examine compiled script with reshacker.exe
-> both icons in RCData are stored in the root:
RCDATA contains
>AUTOHOTKEY SCRIPT<
SAMPLE.ICO
SAMPLE2.ICO
ScriptSource:
sadly i can't use the new Ahk2Exe (1.33.10 or 1.1.34.00_Beta_2) with my ahk-projects
where I don't use a flat directory structure, but have e.g. resources in subfolders, such as
Projectdir\MainFile.ahk
+ Icons\*.ico
+ Lib\*.ahk
to prevent a cleanup procedure in the compiled exe for removing embedded/extracted resources on ExitApp:
i use teadrinker's fantastic HBitMapFromResource - method:
Code: Select all
FileInstall, Icons\Sample.ico, % "EmptyVar" := ""
Gui, Add, Picture, x+10, % "HBITMAP: " . HBitMapFromResource("Icons\Sample.ico")
this is now broken.
to reproduce:
run provided script once to 'install' sample.ico and icons\sample2.ico and check the inteded appearance!
compile script with Ahk2Exe < 1.33.10
run compiled script -> appearance of compiled script: as uncompiled script = OK!
examine compiled script with reshacker.exe
RCDATA contains
>AUTOHOTKEY SCRIPT<
SAMPLE.ICO
ICONS\SAMPLE2.ICO
compile script with Ahk2Exe >= 1.33.10
run compiled script -> Sample2.ico won't show up
examine compiled script with reshacker.exe
-> both icons in RCData are stored in the root:
RCDATA contains
>AUTOHOTKEY SCRIPT<
SAMPLE.ICO
SAMPLE2.ICO
ScriptSource:
Code: Select all
#SingleInstance, force
Main:
SetWorkingDir, % A_ScriptDir
IconSrcPath := "c:\Windows\System32\OneDrive.ico"
;@Ahk2Exe-IgnoreBegin
if FileExist(IconSrcPath) {
if !FileExist("Icons")
FileCreateDir, Icons
if !FileExist("Sample.ico")
FileCopy, % IconSrcPath, Sample.ico
if !FileExist("Icons\Sample2.ico")
FileCopy, % IconSrcPath, Icons\Sample2.ico
} else {
MsgBox, Change IconSrcPath to a valid one and try again!
ExitApp
}
;@Ahk2Exe-IgnoreEnd
FileInstall, Sample.ico, % "EmptyVar" := ""
Gui, Add, Text, xm w100, Sample.ico:
Gui, Add, Picture, x+10, % "HBITMAP: " . HBitMapFromResource("Sample.ico")
Gui, Add, GroupBox, xm w300 h2
FileInstall, Icons\Sample2.ico, % "EmptyVar" := ""
Gui, Add, Text, xm w100, Icons\Sample2.ico:
Gui, Add, Picture, x+10, % "HBITMAP: " . HBitMapFromResource("Icons\Sample2.ico")
Gui, Add, GroupBox, xm w300 h2
; this would show up in compiled (Ahk2Exe >= 1.33.10) script, but not in uncompiled script:
; Gui, Add, Text, xm w100, Sample2.ico:
; Gui, Add, Picture, x+10, % "HBITMAP: " . HBitMapFromResource("Sample2.ico")
Gui Show
return
GuiClose:
ExitApp
; HBitMapFromResource (mentioned) from teadrinker: https://www.autohotkey.com/boards/viewtopic.php?t=83589 , second post:
HBitmapFromResource(resName) {
if !A_IsCompiled
hBitmap := LoadPicture(resName, "GDI+")
else {
hMod := DllCall("GetModuleHandle", "Ptr", 0, "Ptr")
hRes := DllCall("FindResource", "Ptr", hMod, "Str", resName, "UInt", RT_RCDATA := 10, "Ptr")
resSize := DllCall("SizeofResource", "Ptr", hMod, "Ptr", hRes)
hResData := DllCall("LoadResource", "Ptr", hMod, "Ptr", hRes, "Ptr")
pBuff := DllCall("LockResource", "Ptr", hResData, "Ptr")
pStream := DllCall("Shlwapi\SHCreateMemStream", "Ptr", pBuff, "UInt", resSize)
Gdip := new GDIplus
pBitmap := Gdip.CreateBitmapFromStream(pStream)
hBitmap := Gdip.CreateHBITMAPFromBitmap(pBitmap)
Gdip.DisposeImage(pBitmap)
ObjRelease(pStream)
}
Return hBitmap
}
class GDIplus {
__New() {
if !DllCall("GetModuleHandle", "Str", "gdiplus", "Ptr")
DllCall("LoadLibrary", "Str", "gdiplus")
VarSetCapacity(si, A_PtrSize = 8 ? 24 : 16, 0), si := Chr(1)
DllCall("gdiplus\GdiplusStartup", "UPtrP", pToken, "Ptr", &si, "Ptr", 0)
this.token := pToken
}
__Delete() {
DllCall("gdiplus\GdiplusShutdown", "Ptr", this.token)
if hModule := DllCall("GetModuleHandle", "Str", "gdiplus", "Ptr")
DllCall("FreeLibrary", "Ptr", hModule)
}
CreateBitmapFromStream(pStream) {
DllCall("gdiplus\GdipCreateBitmapFromStream", "Ptr", pStream, "PtrP", pBitmap)
Return pBitmap
}
CreateHBITMAPFromBitmap(pBitmap, background := 0xffffffff) {
DllCall("gdiplus\GdipCreateHBITMAPFromBitmap", "Ptr", pBitmap, "PtrP", hbm, "UInt", background)
return hbm
}
DisposeImage(pBitmap) {
return DllCall("gdiplus\GdipDisposeImage", "Ptr", pBitmap)
}
}
Re: Upcoming Ahk2Exe Changes (2021)
Thanks for reporting this. There has been a mention of other problems with FileInstall. I’ll check it out shortly.
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 (2021)
@digidings This is fixed in 1.1.34.00_Beta_3
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 (2021)
1.1.34.00_Beta_3, 11 September 2021
- Fixes 'FileInstall' when a path is specified.
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 (2021)
1.1.34.00_Beta_4, 12 September 2021
- Fixes bug in AddResource introduced in Beta_3
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 (2021)
@digidings See Beta_4 for correct fix.
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 (2021)
1.1.34.00_Beta_5, 17 September 2021
- Include Ahk2Exe in 'Base file' list if relevant.
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 (2021)
@TAC: Thanks for fixing! I confirm expected behavior regarding FileInstall / HBitMapFromResource ("dirName/resource") in uncompiled script and in compiled script with Ahk2Exe 1.1.34.00 Beta_4 / Beta_5
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: Sir MR potatohead and 116 guests