MouseGetPos error handling

Report problems with documented functionality
User avatar
uname
Posts: 29
Joined: 25 Oct 2013, 12:50

MouseGetPos error handling

Post by uname » 10 Dec 2024, 07:16

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.

User avatar
ThioJoe
Posts: 6
Joined: 29 May 2024, 16:14
Contact:

Re: MouseGetPos error handling

Post by ThioJoe » 20 Dec 2024, 11:31

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.

image.png
image.png (991 KiB) Viewed 223 times

Post Reply

Return to “Bug Reports”