Compile_AHK II - for those who compile! [v0.9.2 (04/19/16)]

Post your working scripts, libraries and tools for AHK v1.1 and older
aaffe
Posts: 192
Joined: 16 Jan 2014, 04:23

Re: Compile_AHK II - for those who compile! [v0.9.2 (04/19/16)]

07 Jun 2022, 03:37

TAC109 wrote:
07 Jun 2022, 02:30
@aaffe

Code: Select all

;@Ahk2Exe-PostExec "D:\____BUGFIXE_____\do_signaturing_and_other_things.ahk" "%A_WorkFileName%", 0
;@Ahk2Exe-PostExec "D:\____BUGFIXE_____\do_signaturing_and_other_things.ahk" "%A_WorkFileName%", 1
;@Ahk2Exe-PostExec "D:\____BUGFIXE_____\do_signaturing_and_other_things.ahk" "%A_WorkFileName%", 2
The first line is executed by Ahk2Exe if there is no compression specified, or the second line is executed by Ahk2Exe if MPRESS compression is specified, or the third line is executed by Ahk2Exe if UPX compression is specified. If you always use the same compressor or always have no compression specified, then you only need the relevant line of code, but it is not a problem to always include all three lines.

Cheers
Thank you very much.

Ok, tried it like this:
Zum_Mailen_zippen.ahk:
;@Ahk2Exe-SetMainIcon zum_Mailen_Zippen.ahk_1.ico
;@Ahk2Exe-PostExec "D:\Tmp\Test\Test.exe" "%A_WorkFileName%", 0
;@Ahk2Exe-PostExec "D:\Tmp\Test\Test.exe" "%A_WorkFileName%", 1
;@Ahk2Exe-PostExec "D:\Tmp\Test\Test.exe" "%A_WorkFileName%", 2
...

test.ahk:
FileGettime,time,%1%
msgbox %1%`n%time%x

But I only get a tmp-File:
image.png
image.png (6.34 KiB) Viewed 1102 times
then I tried it with mit sign.exe. Ok, the tmp-file is signed. After that, the renamed exe also stays signed. I will test a bit with the other things I do in my signing-Exe, but I think I really could use this. Thanks Tac109!
aaffe
Posts: 192
Joined: 16 Jan 2014, 04:23

Re: Compile_AHK II - for those who compile! [v0.9.2 (04/19/16)]

07 Jun 2022, 07:51

@TAC109 I have another question please.
How can I get the Version defined in a variable Version get into my exename please?

Code: Select all

Version:="12.54b1"
;@Ahk2Exe-Let U_version = %A_PriorLine~U)^(.+"){1}(.+)".*$~$2%
;@Ahk2Exe-Let exename = %A_ScriptFullPath~\.[^\.]+$~%U_Version.exe%
Thank you very much!
TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Compile_AHK II - for those who compile! [v0.9.2 (04/19/16)]

08 Jun 2022, 21:45

@aaffe

Code: Select all

Version:="12.54b1"
;@Ahk2Exe-Let U_version = %A_PriorLine~U)^(.+"){1}(.+)".*$~$2%
;@Ahk2Exe-Let exename = %A_ScriptFullPath~\.[^\.]+$%_%U_Version%.exe    ; Altered
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
aaffe
Posts: 192
Joined: 16 Jan 2014, 04:23

Re: Compile_AHK II - for those who compile! [v0.9.2 (04/19/16)]

09 Jun 2022, 05:05

TAC109 wrote:
08 Jun 2022, 21:45
@aaffe

Code: Select all

Version:="12.54b1"
;@Ahk2Exe-Let U_version = %A_PriorLine~U)^(.+"){1}(.+)".*$~$2%
;@Ahk2Exe-Let exename = %A_ScriptFullPath~\.[^\.]+$%_%U_Version%.exe    ; Altered
Cheers
Thank you Tac109
But it didnt work. The exe is still named like the ahk, without the Version before the .exe.

;@Ahk2Exe-SetMainIcon S3000-ClientInst-Tool.ahk_1.ico
;@Ahk2Exe-PostExec "D:\____BUGFIXE_____\starte_dateisignierung.exe" "%A_WorkFileName%", 0
;@Ahk2Exe-PostExec "D:\____BUGFIXE_____\starte_dateisignierung.exe" "%A_WorkFileName%", 1
;@Ahk2Exe-PostExec "D:\____BUGFIXE_____\starte_dateisignierung.exe" "%A_WorkFileName%", 2
Version:="12.54b1"
;@Ahk2Exe-Let U_version = %A_PriorLine~U)^(.+"){1}(.+)".*$~$2%
;@Ahk2Exe-Let exename = %A_ScriptFullPath~\.[^\.]+$%_%U_Version%.exe

I just use right click on my ahk -> Compile
Thats right, isnt it?
TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Compile_AHK II - for those who compile! [v0.9.2 (04/19/16)]

09 Jun 2022, 18:28

@aaffe
You will need to add this directive after the others:

Code: Select all

;@Ahk2Exe-ExeName %U_exename%
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
aaffe
Posts: 192
Joined: 16 Jan 2014, 04:23

Re: Compile_AHK II - for those who compile! [v0.9.2 (04/19/16)]

10 Jun 2022, 05:13

TAC109 wrote:
09 Jun 2022, 18:28
@aaffe
You will need to add this directive after the others:

Code: Select all

;@Ahk2Exe-ExeName %U_exename%
Cheers
Thank you again, this did the trick!

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: Bing [Bot] and 122 guests