General information
Category:
Coding, syntax & commands
Title:
How to exit from a scan when i am in a Timer object?
Hi all
I have a screen with a timer on that scans on a file every 20 seconds and if there is an outstanding job it calls an OLE server method to do a specific job. The problem I have, is how to interrupt the timer and get back on the screen.
I tried to have a button on the screen but i never get focus.
I tried to have ON KEY LABEL CTRL+END m.user_stop = .T.
SELECT JOBS
SCAN FOR EMPTY(JOBS.STATUS) &&& Scanning only jobs not completed
if m.user_stop = .t.
wait wind 'Exit job ........'
exit
endif
******** CALL SERVER
OX=CREATEOBJECT(MYSERVER.MYMETHOD)
...
ENDSCAN
With the above code sometimes the process interrupted but not always.
Any ideas ?
Petros
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only