
I need to press the button on the windows 10 speech recognition window because that speech recognition starts in suspended mode

I tryed the code below but no luck.
Any ideas of pushing that button or activate the voice recognition from the popup menu programatically?
Thanks!
Code: Select all
Procedure PushButtonOnVoiceRecognition()
Define mb
Define pos.RECT
mb = FindWindow_(@"MS:SpeechTopLevel", 0)
GetWindowRect_(mb, @pos)
SetCursorPos_(pos\left + 35, pos\top + 25)
mouse_event_(#MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
Sleep_(60)
mouse_event_(#MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
EndProcedure