Upcoming Ahk2Exe changes
-
- Posts: 463
- Joined: 24 Jan 2014, 22:28
Re: Upcoming Ahk2Exe changes
Being able to force admin privileges in the manifest would be amazing!
Re: Upcoming Ahk2Exe changes
Yes, it would quite pleasant to have the simple On-Off directive
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
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]
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 -
Re: Upcoming Ahk2Exe changes
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
So ;@Ahk2Exe-RequireAdmin would be shorthand for ;@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.
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
That makes no sense.joedf wrote: So ;@Ahk2Exe-RequireAdmin would be shorthand for ;@Ahk2Exe-AddResource *24 AutoHotkey.exe.manifest, 1 ?
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]
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 -
Re: Upcoming Ahk2Exe changes
well require Administrator would mean changing the manifest. So lexikos is talking about something else?
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
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]
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 -
Re: Upcoming Ahk2Exe changes
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]
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 -
Re: Upcoming Ahk2Exe changes
Thank you. The "trayicon not change" problem has been fixed.
-
- Posts: 463
- Joined: 24 Jan 2014, 22:28
Re: Upcoming Ahk2Exe changes
Good job, you are awesome!
Re: Upcoming Ahk2Exe changes
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
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
Re: Upcoming Ahk2Exe changes
Hello, I would like to add icons, but I see that even not supported ...
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.
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.
Re: Upcoming Ahk2Exe changes
I just posted a very similar question:Flipeador wrote:Hello, I would like to add icons, ....
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
Re: Upcoming Ahk2Exe changes
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:with these:
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%
Code: Select all
if dropExt = ahk
{
GuiControl,, AhkFile, %A_GuiEvent%
StringReplace, ExeFile, A_GuiEvent, .ahk, .exe
GuiControl,, ExeFile, %ExeFile%
}
Re: Upcoming Ahk2Exe changes
That's unnecessary. If you leave the EXE field blank, it uses the directory and name of the script.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.
Re: Upcoming Ahk2Exe changes
Oh, wow. Never knew that, obviously. Thanks.
Re: Upcoming Ahk2Exe changes
Can you specify the bin file via compiler directive?
Re: Upcoming Ahk2Exe changes
Nice idea for a directive!
Doesn't seem to be in the current list:
https://github.com/fincs/Ahk2Exe/blob/e ... ctives.ahk
Doesn't seem to be in the current list:
https://github.com/fincs/Ahk2Exe/blob/e ... ctives.ahk
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
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
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
Re: Upcoming Ahk2Exe changes
Is my understanding correct and that this ahk2exe compiler can ONLY include resources of the type: .htm, .html, .mht, .bmp, .dib ?