[Moderator's note: Topic moved from Bug Reports.]
Menu.setIcon("xx", "C:\WINDOWS\System32\SHELL32.dll", 130, 32)
icon error
Correct icon
menu setIcon The obtained icon is incorrect
Re: menu setIcon The obtained icon is incorrect
AutoHotkey uses 1-based icon numbers. There's no icon 0. Add 1 to each icon number and you have the icons you want.
Re: menu setIcon The obtained icon is incorrect
It's like this, I think this should be emphasized in the help file, which is different from the default icon numbering in Windows
Re: menu setIcon The obtained icon is incorrect
What should be emphasized?IconNumberType: Integer
If omitted, it defaults to 1 (the first icon group). Otherwise, specify the number of the icon group to be used in the file. For example, MyMenu.SetIcon(MenuItemName, "Shell32.dll", 2) would use the default icon from the second icon group. If negative, its absolute value is assumed to be the resource ID of an icon within an executable file.
Re: menu setIcon The obtained icon is incorrect
Emphasize that the icon obtained by win starts from scratch and requires +1 in ahk
Re: menu setIcon The obtained icon is incorrect
Windows tends to use IDs, not a sequential index; AutoHotkey uses negative numbers for IDs. I don't recall there being any standard OS-provided GUI or utility that will show you an icon number or ID. It's not the documentation author's place to guess where you might have obtained an icon number and whatever scheme it uses.
I think "it defaults to 1 (the first icon group)" is pretty clear. If you miss that, right at the beginning of the documentation for IconNumber, I don't think emphasis will help. It's not as though the documentation can predict the exact thing you're looking for and point it out for you. There could be any number of things that someone else would have liked emphasised at some point in time, but would only be a distraction at any other time.
I think "it defaults to 1 (the first icon group)" is pretty clear. If you miss that, right at the beginning of the documentation for IconNumber, I don't think emphasis will help. It's not as though the documentation can predict the exact thing you're looking for and point it out for you. There could be any number of things that someone else would have liked emphasised at some point in time, but would only be a distraction at any other time.
Return to “Suggestions on Documentation Improvements”
Who is online
Users browsing this forum: No registered users and 4 guests