Element Timer Vars Self#.id dd ? Self#.count dd ? Self#.autostop dd ? Self#.interval dd ? LocalProc local L1 proc Self#.proc hwnd,uMsg,idEvent,dwTime locals _data dd ? endl cmp [Self#.count],0 js @f dec [Self#.count] @@: cmp [Self#.count],0 jnz @f call Self#.off @@: Self#.onTimer 0,data_null match =1,Self#.onStop.use \{ cmp [Self#.count],0 jnz L1 Self#.onStop 0,data_null L1: \} ret endp proc Self#.on cmp [Self#.id],0 jnz @f invoke SetTimer,NULL,0,[Self#.interval],Self#.proc mov [Self#.id],eax @@: mov eax,[Self#.autostop] mov [Self#.count],eax ret endp proc Self#.off cmp [Self#.id],0 jz @f invoke KillTimer,NULL,[Self#.id] mov [Self#.id],0 @@: ret endp Create mov [Self#.id],0 mov [Self#.autostop],Self#.prop.AutoStop mov [Self#.interval],Self#.prop.Interval if Self#.prop.Enable call Self#.on end if Destroy call Self#.off PointWork doTimer call Self#.on EndPoint PointWork doStop call Self#.off \match =1,Self#.onStop.use \\{ Self#.onStop 0,data_null \\} EndPoint PointWork doAutoStop \local res ToInteger res,data,data.type mov_ex [Self#.count],res mov_ex [Self#.autostop],res EndPoint PointWork doInterval \local res ToInteger res,data,data.type mov_ex [Self#.interval],res cmp [Self#.id],0 jz ..end call Self#.off call Self#.on EndPoint EndElement