home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / ibm1 / do101j2.arj / STOP.SCR < prev    next >
Text File  |  1991-12-30  |  2KB  |  67 lines

  1. .pg wi full clr cy
  2.     COMMAND NAME»gray«: »%t« SetStopLabel »ye«
  3.  
  4.     /STOP [{label}]
  5. /cw
  6.     »%t«SetStopLabel»#« defines a label to which »%t«DO»#« will jump when the
  7.     user »ye«aborts a script»#« by pressing »bo«<esc>»#«.  This allows you to
  8.     capture the abort action and route the user back to a »ye«label»#«,
  9.     for example, for a menu. Enter "»ma«/STOP»#«" without the optional
  10.     »cy«{label}»#« to »re«clear»#« the »gr«stop label»#« and return to normal operation.
  11.  
  12.     If you have executed several scripts from other scripts and press the
  13.     »bo«<esc>»#« key, »%t«DO»wh« will stop at the first script with a »ma«Stop Label»wh« set.
  14. »#«
  15.     This »%t«SetStopLabel»#« command will help us define a menu structure to
  16.     follow.  Press »bo«<enter>»#« to execute the command.
  17.  
  18. |/STOP MENU
  19. :MENU
  20. .clr
  21.  
  22.     This menu has the label »ye«:MENU»#« above it.  Press either »bo«<1>»#«
  23.     or »bo«<2>»#« to see the effect of the »%t«/STOP»#« command.  Otherwise
  24.     press »bo«<0>»#« to exit this portion of the tutorial.
  25.  
  26.     »ye«1»gray«.  »wh«Selection 1
  27.     »ye«2»gray«.  »wh«Selection 2
  28.     »re«0»gray«.  »wh«Exit»«
  29.  
  30. /GOTOC "        »gr«Enter selection»gray«:»#«" 120
  31. :1
  32. :2
  33. .clr
  34.  
  35. This is the selection.  Pressing »bo«<esc>»#« would normally terminate
  36. the script.  But, since »%t«SetStopLabel»#« has been executed, it will
  37. return the user to the »ye«:MENU»#« label.  Try it . . .
  38.  
  39. .pg
  40. You did not press »bo«<esc>»#« so this »%t«/GOTO»#« statement below will return
  41. you to the menu as normal.
  42.  
  43. |/GOTO MENU
  44. :0
  45. /CANCEL ONE
  46. .clr
  47.  
  48.    menu completed
  49.  
  50.    The »%t«/STOP»#« command below will remove the stop label so that
  51.    »%t«DO»#« will stop script operation as normal from this point on.
  52.  
  53.    We have also entered a "»gr«/CANCEL »+gr«ONE»#«" command so that just this script
  54.    will be terminated and you will be returned to the »ye«TUTORIAL»#« script.
  55.  
  56.    Press »bo«<esc>»#« at the next page prompt after pressing »bo«<enter>»#« to
  57.    execute the »%t«/STOP»#« command.
  58.  
  59. |/STOP
  60. /PAGE
  61.  
  62.   You did not press »bo«<esc>»#« at the »%t«/PAGE»#« command so »%t«DO»#« continued
  63.   script operation as normal.
  64.  
  65. :END
  66. /ENDEXEC CLEAR
  67.