Page 2 of 8

Re: Upcoming Ahk2Exe changes

Posted: 05 Jan 2015, 09:49
by Bruttosozialprodukt
Being able to force admin privileges in the manifest would be amazing!

Re: Upcoming Ahk2Exe changes

Posted: 05 Jan 2015, 10:05
by joedf
Yes, it would quite pleasant to have the simple On-Off directive :)

Re: Upcoming Ahk2Exe changes

Posted: 05 Jan 2015, 10:16
by fincs
I agree. There should be a specific ;@Ahk2Exe-RequireAdmin directive that would perform the manifest change automatically.

Re: Upcoming Ahk2Exe changes

Posted: 09 Jan 2015, 17:03
by joedf
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 ?

Re: Upcoming Ahk2Exe changes

Posted: 09 Jan 2015, 17:36
by fincs
joedf wrote: So ;@Ahk2Exe-RequireAdmin would be shorthand for ;@Ahk2Exe-AddResource *24 AutoHotkey.exe.manifest, 1 ?
That makes no sense.

Re: Upcoming Ahk2Exe changes

Posted: 09 Jan 2015, 17:39
by joedf
well require Administrator would mean changing the manifest. So lexikos is talking about something else?

Re: Upcoming Ahk2Exe changes

Posted: 09 Jan 2015, 17:44
by fincs
Yes, but the manifest change would be done automatically. As in read the embedded manifest in the EXE, update it, write it back.

Re: Upcoming Ahk2Exe changes

Posted: 11 Jan 2015, 07:00
by fincs
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.

Re: Upcoming Ahk2Exe changes

Posted: 11 Jan 2015, 09:08
by tmplinshi
Thank you. The "trayicon not change" problem has been fixed.

Re: Upcoming Ahk2Exe changes

Posted: 11 Jan 2015, 10:01
by Bruttosozialprodukt
Good job, you are awesome! :bravo:

Re: Upcoming Ahk2Exe changes

Posted: 16 Jan 2015, 05:36
by Peter2
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

Re: Upcoming Ahk2Exe changes

Posted: 16 Jan 2015, 06:59
by Flipeador
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:

Re: Upcoming Ahk2Exe changes

Posted: 16 Jan 2015, 07:18
by Peter2
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?

Re: Upcoming Ahk2Exe changes

Posted: 09 Feb 2015, 16:17
by boiler
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%
}

Re: Upcoming Ahk2Exe changes

Posted: 09 Feb 2015, 16:23
by lexikos
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.

Re: Upcoming Ahk2Exe changes

Posted: 09 Feb 2015, 16:24
by boiler
Oh, wow. Never knew that, obviously. Thanks.

Re: Upcoming Ahk2Exe changes

Posted: 15 Feb 2015, 20:34
by GeekDude
Can you specify the bin file via compiler directive?

Re: Upcoming Ahk2Exe changes

Posted: 15 Feb 2015, 20:50
by joedf
Nice idea for a directive! :+1:
Doesn't seem to be in the current list:
https://github.com/fincs/Ahk2Exe/blob/e ... ctives.ahk

Re: Upcoming Ahk2Exe changes

Posted: 24 Feb 2015, 12:36
by Capbat
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

Re: Upcoming Ahk2Exe changes

Posted: 22 Mar 2015, 21:10
by Skrell
Is my understanding correct and that this ahk2exe compiler can ONLY include resources of the type: .htm, .html, .mht, .bmp, .dib ?