Upcoming Ahk2Exe changes

Community news and information about new or upcoming versions of AutoHotkey
Bruttosozialprodukt
Posts: 463
Joined: 24 Jan 2014, 22:28

Re: Upcoming Ahk2Exe changes

05 Jan 2015, 09:49

Being able to force admin privileges in the manifest would be amazing!
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Upcoming Ahk2Exe changes

05 Jan 2015, 10:05

Yes, it would quite pleasant to have the simple On-Off directive :)
Image Image Image Image Image
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]
User avatar
fincs
Posts: 527
Joined: 30 Sep 2013, 14:17
Location: Seville, Spain
Contact:

Re: Upcoming Ahk2Exe changes

05 Jan 2015, 10:16

I agree. There should be a specific ;@Ahk2Exe-RequireAdmin directive that would perform the manifest change automatically.
fincs
Windows 11 Pro (Version 22H2) | AMD Ryzen 7 3700X with 32 GB of RAM | AutoHotkey v2.0.0 + v1.1.36.02
Get SciTE4AutoHotkey v3.1.0 - [My project list]
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Upcoming Ahk2Exe changes

09 Jan 2015, 17:03

lexikos wrote: ... 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

;@Ahk2Exe-AddResource *24 AutoHotkey.exe.manifest, 1
fincs wrote:I agree. There should be a specific ;@Ahk2Exe-RequireAdmin directive that would perform the manifest change automatically.
So ;@Ahk2Exe-RequireAdmin would be shorthand for ;@Ahk2Exe-AddResource *24 AutoHotkey.exe.manifest, 1 ?
Image Image Image Image Image
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]
User avatar
fincs
Posts: 527
Joined: 30 Sep 2013, 14:17
Location: Seville, Spain
Contact:

Re: Upcoming Ahk2Exe changes

09 Jan 2015, 17:36

joedf wrote: So ;@Ahk2Exe-RequireAdmin would be shorthand for ;@Ahk2Exe-AddResource *24 AutoHotkey.exe.manifest, 1 ?
That makes no sense.
fincs
Windows 11 Pro (Version 22H2) | AMD Ryzen 7 3700X with 32 GB of RAM | AutoHotkey v2.0.0 + v1.1.36.02
Get SciTE4AutoHotkey v3.1.0 - [My project list]
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Upcoming Ahk2Exe changes

09 Jan 2015, 17:39

well require Administrator would mean changing the manifest. So lexikos is talking about something else?
Image Image Image Image Image
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]
User avatar
fincs
Posts: 527
Joined: 30 Sep 2013, 14:17
Location: Seville, Spain
Contact:

Re: Upcoming Ahk2Exe changes

09 Jan 2015, 17:44

Yes, but the manifest change would be done automatically. As in read the embedded manifest in the EXE, update it, write it back.
fincs
Windows 11 Pro (Version 22H2) | AMD Ryzen 7 3700X with 32 GB of RAM | AutoHotkey v2.0.0 + v1.1.36.02
Get SciTE4AutoHotkey v3.1.0 - [My project list]
User avatar
fincs
Posts: 527
Joined: 30 Sep 2013, 14:17
Location: Seville, Spain
Contact:

Re: Upcoming Ahk2Exe changes

11 Jan 2015, 07:00

I have updated the OP with new binaries that include all bugfixes since 2013 and a few small changes:
  • The preprocessed script is now fed to /iLib, meaning there's no limitation anymore when using conditional compilation blocks and auto-included StdLib files.
  • @Ahk2Exe-SetConsoleSubsys has been renamed to @Ahk2Exe-ConsoleApp.
  • .manifest files are now detected as RT_MANIFEST (24) resources; and the default resource name for them is 1.
  • @Ahk2Exe-UseSeparateTrayIcon is scheduled for removal since the next version of AutoHotkey is doing away with separate main/tray icon resources.
fincs
Windows 11 Pro (Version 22H2) | AMD Ryzen 7 3700X with 32 GB of RAM | AutoHotkey v2.0.0 + v1.1.36.02
Get SciTE4AutoHotkey v3.1.0 - [My project list]
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: Upcoming Ahk2Exe changes

11 Jan 2015, 09:08

Thank you. The "trayicon not change" problem has been fixed.
Bruttosozialprodukt
Posts: 463
Joined: 24 Jan 2014, 22:28

Re: Upcoming Ahk2Exe changes

11 Jan 2015, 10:01

Good job, you are awesome! :bravo:
Peter2
Posts: 325
Joined: 21 Sep 2014, 14:38
Location: CH

Re: Upcoming Ahk2Exe changes

16 Jan 2015, 05:36

Hi

thanks for the update - it works fine for me.

Small remarks:

a) Sugestion for low-level-users like me:
Of course I stumbled about the comma in my directive: "my name, my country" , and of course it is described exactly in the helpfile, but dummies like me always need example where all allowed and all forbidden stuff can be seen.

b) ;@Ahk2Exe-UseResourceLang 0x340A
Maybe I'm on the wrong way, but the language displayed in the file properties stays "English - 0409"

c) Missing ressources:
If the ressources behind ";@Ahk2Exe-AddResource" are not found, there is an "Error: out of memory ... Line 472 ....". After pressing "OK" the right message is displayed.

Thanks and regards

Peter
Peter (AHK Beginner) / Win 10 x64, AHK Version v1.1.33
User avatar
Flipeador
Posts: 1204
Joined: 15 Nov 2014, 21:31
Location: Argentina
Contact:

Re: Upcoming Ahk2Exe changes

16 Jan 2015, 06:59

Hello, I would like to add icons, but I see that even not supported ... :lol:
I have a question, as I use the resources ?, I have a gui with .png images that are inside a folder, and how to use them if I add in the .exe file? :?: . thx. :clap:
Peter2
Posts: 325
Joined: 21 Sep 2014, 14:38
Location: CH

Re: Upcoming Ahk2Exe changes

16 Jan 2015, 07:18

Flipeador wrote:Hello, I would like to add icons, ....
I just posted a very similar question:
Use Icons in compiled scripts
http://ahkscript.org/boards/viewtopic.php?f=5&t=5951

Maybe this detailed discussion can be continued there?
Peter (AHK Beginner) / Win 10 x64, AHK Version v1.1.33
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: Upcoming Ahk2Exe changes

09 Feb 2015, 16:17

I just thought I'd mention this since it's a minor change I like to implement myself and maybe others would too (including perhaps the official version). Since almost every time I compile a file, I'm naming it to the same thing and placing it in the same directory as the source code (with an .exe extension obviously), I like to be able to drop the .ahk file on the Ahk2Exe GUI and have it automatically fill in the name and path to the .exe file as well. With this mod, all I do is drop an .ahk file
and an .ico file and click Convert. I know this sounds like I might as well compile by right-clicking on the source file, but then I can't specify an icon and the last used icon is often not the one I need.

So I make this minor change to the source, which I don't mind, but it would be nice if this were how the official version operated. I don't really see a drawback either because it only auto-populates the .exe field after an .ahk file was dropped on it, and then you can still browse for a new path and name if you want, just like always. So it's unobtrusive and no added steps if you don't use the default location it fills in.

The change is replacing these lines:

Code: Select all

if dropExt = ahk
	GuiControl,, AhkFile, %A_GuiEvent%
with these:

Code: Select all

if dropExt = ahk
{
	GuiControl,, AhkFile, %A_GuiEvent%
	StringReplace, ExeFile, A_GuiEvent, .ahk, .exe
	GuiControl,, ExeFile, %ExeFile%
}
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Upcoming Ahk2Exe changes

09 Feb 2015, 16:23

boiler wrote:I like to be able to drop the .ahk file on the Ahk2Exe GUI and have it automatically fill in the name and path to the .exe file as well.
That's unnecessary. If you leave the EXE field blank, it uses the directory and name of the script.
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: Upcoming Ahk2Exe changes

09 Feb 2015, 16:24

Oh, wow. Never knew that, obviously. Thanks.
geek
Posts: 1052
Joined: 02 Oct 2013, 22:13
Location: GeekDude
Contact:

Re: Upcoming Ahk2Exe changes

15 Feb 2015, 20:34

Can you specify the bin file via compiler directive?
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Upcoming Ahk2Exe changes

15 Feb 2015, 20:50

Nice idea for a directive! :+1:
Doesn't seem to be in the current list:
https://github.com/fincs/Ahk2Exe/blob/e ... ctives.ahk
Image Image Image Image Image
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]
User avatar
Capbat
Posts: 101
Joined: 17 May 2014, 13:33
Location: Québec Canada

Re: Upcoming Ahk2Exe changes

24 Feb 2015, 12:36

Hi

Funny things happen to Ahk2EXE. It was working ok even this morning. Then all of a sudden the second Browse button (Destination exe file) does NOT work anymore. Although if I leave empty it will still compile but using the same name as the source script name and in the same directory. I am using v1.1.16.05.
So I have tried the new one V1.1.19.01 and I am having the same problem. The last time I had problem with Ahk2Exe was a while ago and I had to re-download all of AHK wich caused me a lot of problems. I rebooted to no avail.

UPDATE: I have now downloaded the latest AHK 1.1.19.03 and same version of AHK2EXE with same problem.

Any Ideas?

Thanks

Bat
Skrell
Posts: 302
Joined: 23 Jan 2014, 12:05

Re: Upcoming Ahk2Exe changes

22 Mar 2015, 21:10

Is my understanding correct and that this ahk2exe compiler can ONLY include resources of the type: .htm, .html, .mht, .bmp, .dib ?

Return to “Announcements”

Who is online

Users browsing this forum: No registered users and 41 guests