Related thread: ControlGetClassNN error with Win10 Win+v Clipboard
TLDR: UWP apps that have no traditional controls producing an error when trying to get ClassNN of a child window.
Issue: MouseGetPos documentation page has nothing about ClassNN retrieval error. It's totally unexpected behaviour when MouseGetPos throwing "Failed" upon trying to get classNN of, let's say, "Windows Input Experience" window.
Suggestion: When MouseGetPos is unable to get ClassNN it should not throw an error, in this case just left OutputVarControl blank or unset.
MouseGetPos error handling
Re: MouseGetPos error handling
Yes I was just about to post about this. A specific example might be the "Start 11" app which I guess is a UWP, though doesn't look like a usual one.
I use MouseGetPos in a #HotIf conditional so it throws an error any time I even hover over the Window. Though the above example is placed on a hotkey.
It would be nice if it just returned an empty string or something for classNN, instead of having to use a Try/Catch which is slow compared to a simple string compare.
I use MouseGetPos in a #HotIf conditional so it throws an error any time I even hover over the Window. Though the above example is placed on a hotkey.
It would be nice if it just returned an empty string or something for classNN, instead of having to use a Try/Catch which is slow compared to a simple string compare.