Invalid Hotstring options dont raise error/warning.

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
RaptorX
Posts: 378
Joined: 06 Dec 2014, 14:27
Contact:

Invalid Hotstring options dont raise error/warning.

Post by RaptorX » 31 Jan 2023, 17:02

I was testing some code and noticed that while this raises an error:

Code: Select all

~%F1::msgbox true ; think about adding an invalid modifier/option to a hotkey

I would have expected the same behavior with hotstrings but if you try this code:

Code: Select all

:$*:btw::by the way ; invalid hotstring option
The error is just ignored v1 style. :D
You can try using any invalid character there an no errors are raised, but the script keeps running without issues, they are just ignored.

Is that intended behavior?
Projects:
AHK-ToolKit

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Invalid Hotstring options dont raise error/warning.

Post by swagfag » 31 Jan 2023, 22:24

https://github.com/AutoHotkey/AutoHotkey/blame/27a2d5f2ae392c9d2cf2ef1a2f136659831749b8/source/hotkey.cpp#L2509-L2587
considering this hasnt been touched much since v1, yes, uve got literal v1 style error reporting. none whatsoever

as for whether its intended, doubt it. but since noones complained hard enough about this so far and it wouldnt have been worth delaying the release to fix it, it is what it is

User avatar
RaptorX
Posts: 378
Joined: 06 Dec 2014, 14:27
Contact:

Re: Invalid Hotstring options dont raise error/warning.

Post by RaptorX » 04 Feb 2023, 14:54

Hopefully this will be addressed soon.
Projects:
AHK-ToolKit

Post Reply

Return to “Ask for Help (v2)”