Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement