DEFINE TIMER oTimer INTERVAL 500 OF oWnd ;
ACTION ( nTime++, if ( nTime == 4, UpdateSendReceive(), ))
ACTIVATE TIMER oTimer
on UpdateSendReceive() must call some function but it not run well
- Code: Select all Expand view
- function UpdateSendReceive()
local nReC
if ! lWorking
//nReC:=TGMSGS->(recno())
sysrefresh()
TRY
if isinternet()
if oTimer:nInterval=5000
oTimer:nInterval=1500
ntime:=0
endif
lWorking = .T.
ReadMessage()
sysrefresh()
* replymsgAdmin()
* sysrefresh()
ReplyMsg()
sysrefresh()
else
if oTimer:nInterval#5000
oTimer:nInterval=5000
ntime:=0
endif
endif
SELECT MS
MS->(OrdSetFocus(1)) //TAG "UpdtId"
MS->(DbGoTop())
oBrw:setfocus()
obrw:Refresh()
lWorking = .F.
CATCH oError
oErr:=.t.
end
endif
sysrefresh()
return nil
I wish on each 1500 second it call UpdateSendReceive()
How i resolve ?