@Nine how can catch with regex pattern, e.g. one click on the control
0x001D0E6A WindowsForms10.BUTTON.app.0.1a52015 _r22_ad1 20 1904234
so as not to catch any of the rest, without the use of INSTANCE ?
$hWnd = WinWait("ShareX - Color picker", "", 3)
ConsoleWrite("$hWnd=" & $hWnd & @CRLF)
;pick color from screen WindowsForms10.BUTTON.app.0.1a52015 _r22_ad1
$hPickColorFromScreen = ControlGetHandle($hWnd, "", '[REGEXPCLASS:WindowsForms10\.BUTTON\.app\.0\..+_r\d+_ad1; INSTANCE:20]')
ConsoleWrite("$hPickColorFromScreen=" & $hPickColorFromScreen & @CRLF)
ControlClick($hWnd, '', $hPickColorFromScreen)
Edit:
or this is a need case ?