Posts: 1
Threads: 1
Joined: Oct 2014
hello
how to make macro to read time from window screen (ex: 12:33:55:556)
at a certain time it rum the macro
Thanks
Posts: 12,072
Threads: 140
Joined: Dec 2002
Example with Windows 7 clock.
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
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.