Kbase P116738: Can keyboard or mouse events fire when the application is run in batch mode?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/11/2006 |
|
Status: Unverified
GOAL:
Can keyboard or mouse events fire when the application is run in batch mode?
GOAL:
Can the 'GO' event fire in batch mode application?
GOAL:
How to execute session triggers in batch mode.
FIX:
In general it is not recommended to use any keyboard or mouse events in procedures designed to be run in batch mode. However, one could get away with it provided that both input and output are done without requiring user interaction and by explicitly firing the GO event using the APPLY statement. For example:
/* test batch with ON GO ANYWHERE */
ON GO ANYWHERE DO:
MESSAGE "ON GO ANYWHERE trigger Fired"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
INPUT FROM myInput.txt.
OUTPUT TO myOutput.txt.
RUN proc-hallo.
PROCEDURE proc-hallo:
DEFINE VARIABLE iVar AS INTEGER NO-UNDO.
UPDATE iVar WITH FRAME f.
APPLY "GO" TO FRAME f.
END PROCEDURE.
INPUT CLOSE.
OUTPUT CLOSE.
Where "myInput.txt" is a text file containing some integer values.