Hey all.
Need some help automating MS Word dictation service. It needs to keep going and if it's stops to activate it again
If it loses focus it stops dictation service
Activation/click is weird. It activated 3rd button from the ribbon so I moved Dictate to 3rd position on 1nd page
Sometimes it's Instance1 and sometimes its instance2
I suspect it might be some default button for the ribbon or something [CLASS:NetUIHWND; INSTANCE:1]
Thanks in advance
p.s. I do launch MS Word manually for now. I know I can launch it from COM call
$WordWindow=WinActivate("Document1 - Word","Microsoft Word Docum")
;WinSetOnTop($WordWindow, "", 1)
ControlFocus("", "", "[CLASS:NetUIHWND; INSTANCE:2]")
Send("{DOWN}")
; Navigate
Send("{ENTER}") ; Select
$Dictation=ControlClick("", "", "[CLASS:NetUIHWND; INSTANCE:2]", "left", 1)
while True
;$iCount = ControlCommand($Dictation, "", "[CLASS:NetUIHWND; INSTANCE:1]", "IsEnabled")
;onsoleWrite($iCount )
If Not WinActive($WordWindow) Then
WinActivate($WordWindow)
$Dictation=ControlClick("", "", "[CLASS:NetUIHWND; INSTANCE:1]", "left", 1)
EndIf
sleep(1000)
WEnd