Upcoming Ahk2Exe changes

Community news and information about new or upcoming versions of AutoHotkey
Bruttosozialprodukt
Posts: 451
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: 6001
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: Upcoming Ahk2Exe changes

05 Jan 2015, 10:05

Yes, it would quite pleasant to have the simple On-Off directive :)
User avatar
fincs
Posts: 500
Joined: 30 Sep 2013, 14:17
GitHub: fincs
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 10 x64 Build 14393 / AutoHotkey v1.1.24.04
Get SciTE4AutoHotkey v3.0.06.01 - [My project list]
User avatar
joedf
Posts: 6001
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
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] [Download] GeSHi © Codebox Plus

;@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 ?
User avatar
fincs
Posts: 500
Joined: 30 Sep 2013, 14:17
GitHub: fincs
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 10 x64 Build 14393 / AutoHotkey v1.1.24.04
Get SciTE4AutoHotkey v3.0.06.01 - [My project list]
User avatar
joedf
Posts: 6001
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
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?
User avatar
fincs
Posts: 500
Joined: 30 Sep 2013, 14:17
GitHub: fincs
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 10 x64 Build 14393 / AutoHotkey v1.1.24.04
Get SciTE4AutoHotkey v3.0.06.01 - [My project list]
User avatar
fincs
Posts: 500
Joined: 30 Sep 2013, 14:17
GitHub: fincs
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 10 x64 Build 14393 / AutoHotkey v1.1.24.04
Get SciTE4AutoHotkey v3.0.06.01 - [My project list]
tmplinshi
Posts: 1092
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: 451
Joined: 24 Jan 2014, 22:28

Re: Upcoming Ahk2Exe changes

11 Jan 2015, 10:01

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

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 7 x64, AHK Version v1.1.22.xx
User avatar
Flipeador
Posts: 430
Joined: 15 Nov 2014, 21:31
GitHub: Flipeador
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: 218
Joined: 21 Sep 2014, 14:38
Location: CH
Contact:

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 7 x64, AHK Version v1.1.22.xx
User avatar
boiler
Posts: 1991
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] [Download] (Script.ahk)GeSHi © Codebox Plus

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

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

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

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: 1991
Joined: 21 Dec 2014, 02:44

Re: Upcoming Ahk2Exe changes

09 Feb 2015, 16:24

Oh, wow. Never knew that, obviously. Thanks.
User avatar
joedf
Posts: 6001
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
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
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: 163
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 2 guests