Upcoming Ahk2Exe changes

Community news and information about new or upcoming versions of AutoHotkey
User avatar
fincs
Posts: 500
Joined: 30 Sep 2013, 14:17
GitHub: fincs
Location: Seville, Spain
Contact:

Upcoming Ahk2Exe changes

04 Nov 2013, 16:38

I am implementing new functionality in Ahk2Exe, the script compiler; which is now available for testing.

Download (Preview 2a) - this zip file contains Ahk2Exe.exe which you can drop right into your Compiler folder.
Source

New features
  • Ability to change the version information (such as the name, description, version...).
  • Ability to add resources to the compiled script.
  • Ability to tweak several misc aspects of compilation.
  • Ability to remove code sections from the compiled script and viceversa.

Documentation
Have a look at the WIP compiler directives documentation.

Examples
NEW: Bitmap and HTML resource demo (requires at least Preview 1a)

The script below is a very crude example that I used for testing but which should nevertheless show the new capabilities of Ahk2Exe:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

fincs
Windows 10 x64 Build 14393 / AutoHotkey v1.1.24.04
Get SciTE4AutoHotkey v3.0.06.01 - [My project list]
User avatar
oldbrother
Posts: 130
Joined: 23 Oct 2013, 05:08

Re: Upcoming Ahk2Exe changes

05 Nov 2013, 22:18

Nice!
User avatar
joedf
Posts: 5497
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: Upcoming Ahk2Exe changes

29 Nov 2013, 03:00

Can't wait for it to be the official release :P
User avatar
fincs
Posts: 500
Joined: 30 Sep 2013, 14:17
GitHub: fincs
Location: Seville, Spain
Contact:

Re: Upcoming Ahk2Exe changes

06 Dec 2013, 13:30

Uploaded Preview 2, see git log:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Todo list:
  • Add support in directives for specifying things such as %A_ScriptFullPath%.
  • Add support for changing or adding arbitrary fields in version info.
  • Add support for replacing and deleting resources.
  • Icon resource support.
  • If there is enough demand: cursor resource support.
fincs
Windows 10 x64 Build 14393 / AutoHotkey v1.1.24.04
Get SciTE4AutoHotkey v3.0.06.01 - [My project list]
User avatar
joedf
Posts: 5497
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: Upcoming Ahk2Exe changes

06 Dec 2013, 13:51

Hoorrray! You've added the Console subsystem! :D
Yay! Mister LibCon.ahk will be happy :D
step
Posts: 3
Joined: 29 Mar 2014, 12:43

Re: Upcoming Ahk2Exe changes

29 Mar 2014, 13:02

It took me a while to find the new home of this thread, I was still hanging out the old forum; I didn't realize this is where the action is. Well, now I know. Back on topic now.
I was intrigued about the AddResource directive and played a little with the Bitmap and HTML resource demo (download from the first post). So I figured how to add PNG resources and use them in an HTML resource.

Code: [Select all] [Download] (test.ahk)GeSHi © Codebox Plus

;@Ahk2Exe-AddResource test.png
;@Ahk2Exe-AddResource test.html

Code: [Select all] [Download] (test.html)GeSHi © Codebox Plus

<!DOCTYPE html>
<html><head></head><body>
<img src="res://test.exe/10/test.png">
</body>
</html>

Note that the script exe name test.exe must be embedded into the resource file. This isn't ideal (limits renaming and portability), but I couldn't figure out another way to make the res:// protocol find the png resource. I think the filename suffices as long as it's in the PATH or in the working dir. See references for more info.
10 is the RCDATA resource type, works for png. Use 2 for bmp.

References:
res protocol: http://support.microsoft.com/kb/220830 and http://msdn.microsoft.com/en-us/library ... 85%29.aspx
resource types: http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Edit:
Possibly a work-around for needing to embed the script exe name could be for the script to create a hard or soft link to %A_ScriptFullPath% and specify the link name in the res:// protocol line. It should work (untested).
User avatar
joedf
Posts: 5497
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: Upcoming Ahk2Exe changes

21 Apr 2014, 02:48

I wonder... When is this gonna replace the main "branch".
Does it still have any know stability issues? Just curious... :P
User avatar
jNizM
Posts: 2155
Joined: 30 Sep 2013, 01:33
GitHub: jNizM

Re: Upcoming Ahk2Exe changes

27 Oct 2014, 02:42

Is there anything new fincs? A possible release date?
[AHK] 1.1.25.02 x64 Unicode
[WIN] 10 Pro (Version 1607 | Build 14393.1198) x64
My GitHub Profile | Donations are appreciated if I could help you
User avatar
joedf
Posts: 5497
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: Upcoming Ahk2Exe changes

27 Oct 2014, 03:05

Yes, for now I'm not using it. I am waiting for it to be the "stable" release. I really want to use those directives :P
It would be good to actually have these directives IN the Ahk docs too, once it is "Stable".
vasili111
Posts: 725
Joined: 21 Jan 2014, 02:04
Location: Georgia

Re: Upcoming Ahk2Exe changes

27 Oct 2014, 04:06

Yes, it will be nice to see these changes in stable version of AutoHotkey.
DRAKON-AutoHotkey: Visual programming for AutoHotkey.
User avatar
xZomBie
Posts: 250
Joined: 02 Oct 2013, 02:57

Re: Upcoming Ahk2Exe changes

30 Oct 2014, 06:17

@finc when will this be released in the stable AutoHotkey installer?
User avatar
fincs
Posts: 500
Joined: 30 Sep 2013, 14:17
GitHub: fincs
Location: Seville, Spain
Contact:

Re: Upcoming Ahk2Exe changes

30 Oct 2014, 10:48

I currently consider this low priority due to my lack of time to finish it and apparently the lack of demand. Nonetheless I hope to finish it in the future.
fincs
Windows 10 x64 Build 14393 / AutoHotkey v1.1.24.04
Get SciTE4AutoHotkey v3.0.06.01 - [My project list]
User avatar
xZomBie
Posts: 250
Joined: 02 Oct 2013, 02:57

Re: Upcoming Ahk2Exe changes

30 Oct 2014, 23:50

I hope that the future is near. :D
Just realized that I spelled your name wrong... Sorry about that fincs...
Peter2
Posts: 218
Joined: 21 Sep 2014, 14:38
Location: CH
Contact:

Re: Upcoming Ahk2Exe changes

13 Dec 2014, 13:11

fincs wrote:.... and apparently the lack of demand. ...

The demand is here - but this release is not so easy to find...
Peter (AHK Beginner) / Win 7 x64, AHK Version v1.1.22.xx
User avatar
joedf
Posts: 5497
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: Upcoming Ahk2Exe changes

13 Dec 2014, 19:56

+1
User avatar
joedf
Posts: 5497
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: Upcoming Ahk2Exe changes

24 Dec 2014, 06:25

For /NoDecompile discussion, please go to the following topic : viewtopic.php?f=13&t=5699
tmplinshi
Posts: 1058
Joined: 01 Oct 2013, 14:57

Re: Upcoming Ahk2Exe changes

04 Jan 2015, 12:10

It seems the tray icon not changed, only main icon.
Bruttosozialprodukt
Posts: 447
Joined: 24 Jan 2014, 22:28

Re: Upcoming Ahk2Exe changes

04 Jan 2015, 22:07

I'm soo stoked for this!
Especially for the version info. But adding resources sounds awesome too.

And I agree this is too hard to find. It didn't show up for me when I googled for "autohtkey alternative compiler".
User avatar
joedf
Posts: 5497
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: Upcoming Ahk2Exe changes

04 Jan 2015, 22:29

;@Ahk2Exe-SetConsoleSubsys
is really cool, since ahk will "official" support scripting console "apps"..
I do think that when this is a stable release, that all these ahk2exe directives should be thoroughly documented in the ahk documentation. ;)
lexikos
Posts: 5390
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Upcoming Ahk2Exe changes

05 Jan 2015, 06:30

Why not ;@Ahk2Exe-SetTrayIcon to go with ;@Ahk2Exe-SetMainIcon instead of ;@Ahk2Exe-UseSeparateTrayIcon?

One useful resource type not mentioned in the documentation is 24 - the executable manifest. The most useful edit is to change the requestedExecutionLevel element's level attribute to requireAdministrator. The manifest must have ID 1:

Code: [Select all] [Download] GeSHi © Codebox Plus

;@Ahk2Exe-AddResource *24 AutoHotkey.exe.manifest, 1

Return to “Announcements”

Who is online

Users browsing this forum: No registered users and 4 guests