10-16-2014, 07:51 AM
Example with Windows 7 clock.
Function Function292
The 3 lines starting from the int w... line can be created with dialogs that you can find in the floating toolbar, menu 'Windows,controls'.
If the time cannot be captured as accessible object, try other dialogs from the menu.
Function Function292
str sTime="10:49"
rep
,1
,int w=win("" "Shell_TrayWnd")
,Acc a.Find(w "CLOCK" "Clock" "class=TrayClockWClass[]id=303" 0x1005)
,str s=a.Value
,;out s
,s.gett(s 0 ",")
,;out s
,if s=sTime
,,out s
,,break
If the time cannot be captured as accessible object, try other dialogs from the menu.