I believe in List of Windows Messages Help Section, hexidecimal code should be 4 digits rather than 2-4.
for instance WM_SETTEXT := 0x0C should rather be WM_SETTEXT := 0x000C
the reason is consistency with Microsoft, see
https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-settext
To quote Skan here : Leading zeroes in constants helps to identify the integer type, like 0x000C Short 0X0000000C Long
This applies to other parts of the help file.
Also I noticed some variations (capital X) see comments in PostMessage / SendMessage command:
SendMessage, 0xC, 0, &MyVar, ClassNN, WinTitle ; 0XC is WM_SETTEXT
should also be 0x000C
Do you agree?
Windows messages hexidecimal code lenght Topic is solved
-
- Posts: 143
- Joined: 22 Apr 2016, 06:50
Re: Windows messages hexidecimal code lenght
I agree! It's known that AutoHotkey will accept shorter versions of the message codes, removing the leading zeroes, however I would like to see the full codes referenced in the documentation.
Does it matter? No, not really -- if you're an experienced developer and know what you're doing. However, for inexperienced users who are learning, I think consistency is preferred.
It could be mentioned on the page that the leading zeros can be removed if desired, but leave that to the user to decide.
I usually add the extra digits in my scripts.
AutoIt's message code list, for reference: https://www.autoitscript.com/autoit3/docs/appendix/WinMsgCodes.htm
Does it matter? No, not really -- if you're an experienced developer and know what you're doing. However, for inexperienced users who are learning, I think consistency is preferred.
It could be mentioned on the page that the leading zeros can be removed if desired, but leave that to the user to decide.
I usually add the extra digits in my scripts.
AutoIt's message code list, for reference: https://www.autoitscript.com/autoit3/docs/appendix/WinMsgCodes.htm
Re: Windows messages hexidecimal code lenght Topic is solved
Thanks for reporting. The change is included in PR #464.
Return to “Suggestions on Documentation Improvements”
Who is online
Users browsing this forum: No registered users and 3 guests