Good afternoon.
I want detect focused guy example, button, edit, menu etc and speak it with sapi.
I use this:
Code:
#include com.ahk
COM_CoInitialize()
sapi:=COM_CreateObject("SAPI.SPvoice")
gui,add,button,vopen ggo,open
gui,add,button,gclose vclose,close
gui,show,,test
settimer,speaktext,2000
return
go:
COM_Invoke(sapi, "speak", "This is test only", "3")
return
close:
exitapp
return
speaktext:
GUIControlGet Control, FocusV
if control=open
COM_Invoke(sapi, "speak", control "button", "3")
else if control=close
COM_Invoke(sapi, "speak", control "button", "3")
return
but this isn't good, because the timer speak the focused button again.
Exists some other method to detect focus and speak it?