Ahk2Exe-AddResource - Include many .ico files at once?
Ahk2Exe-AddResource - Include many .ico files at once?
I have a script which uses 100 .ico files (the numbers 1-100) with TraySetIcon, and I would like to include them in the compiled script. Is there any better way to include them than just having 100 lines of ;@Ahk2Exe-AddResource?
Re: Ahk2Exe-AddResource - Include many .ico files at once?
Although I did not try it, you may be able to zip the files, include the zipped file, and then unzip them later.
Re: Ahk2Exe-AddResource - Include many .ico files at once?
The issue with that is that I would like to be able to easily set the script's tray icon to these included icons, i.e. with V1's Menu, Tray, Icon, %A_ScriptFullPath%, -<icon number>, -1 or with V2's TraySetIcon(A_ScriptFullPath, -<icon number>, 1). This code works if the icons are included one-by-one with ;@Ahk2Exe-AddResource <icon path>, <icon number>
Re: Ahk2Exe-AddResource - Include many .ico files at once?
Why not create one ICO library file - https://en.wikipedia.org/wiki/ICO_(file_format) so you only have one file, you can refer to the icons by number https://www.autohotkey.com/docs/commands/Menu.htm#Icon
Re: Ahk2Exe-AddResource - Include many .ico files at once?
How do I access icons from an icon library that is embedded inside an exe? Because I would need to specify the resouce ID of the library iteself within the exe, and then also the number of the icon inside the library, and I don't think that's supported without extracting the library to some temporary directory or some other complicated workaround.