home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / tt2man.zip / ttauto.doc < prev    next >
Text File  |  1993-12-13  |  306KB  |  8,117 lines

  1.  
  2.                              TABLE OF CONTENTS                              
  3.  
  4.  
  5.           12. AUTOPILOT Statement Reference
  6.             12.1 ACTION_ID Function
  7.             12.2 ACTION_INFO Function
  8.             12.3 ACTION_OBJECT Function
  9.             12.4 ACTION_TYPE Function
  10.             12.5 ACTION_WINDOW Function
  11.             12.6 ADD TO Statement
  12.             12.7 ASC Function
  13.             12.8 ATTRIBUTE Function
  14.             12.9 BEEP Statement
  15.             12.10 CARRIER Statement
  16.             12.11 CHECK Statement
  17.             12.12 CLOSE Statement
  18.             12.13 CLS HOST Statement
  19.             12.14 CONNECT and JUMP Statements
  20.             12.15 COPY_FROM_HOST Statement
  21.             12.16 COPY_TO_HOST Statement
  22.             12.17 CREATE DDE_LINK Statement (Client)
  23.             12.18 CREATE DDE_LINK Statement (Server)
  24.             12.19 CREATE DIALOG_WINDOW Statement
  25.               12.19.1 ACTION_BAR_MENU Clause
  26.               12.19.2 CHECK_BOX Clause
  27.               12.19.3 COMBINATION_BOX Clause
  28.               12.19.4 ENTRY_FIELD Clause
  29.               12.19.5 GROUP_BOX Clause
  30.               12.19.6 ICON_FIELD Clause
  31.               12.19.7 LIST_BOX Clause
  32.               12.19.8 MULTILINE_ENTRY_FIELD Clause
  33.               12.19.9 PUSH_BUTTON Clause
  34.               12.19.10 RADIO_BUTTON Clause
  35.               12.19.11 TEXT_FIELD Clause
  36.             12.20 CREATE SESSION_MONITOR Statement
  37.               12.20.1 TEXT_WATCH Clause
  38.               12.20.2 HOST_KEY_WATCH Clause
  39.             12.21 DDE_EXECUTE Statement (Client)
  40.             12.22 DDE_POKE Statement (Client)
  41.             12.23 DDE_REQUEST Statement (Client)
  42.             12.24 DDE_UPDATE Statement (Server)
  43.             12.25 DECLARE FUNCTION Statement
  44.             12.26 DESELECT Statement
  45.             12.27 DESTROY Statement
  46.             12.28 DIAL Statement
  47.             12.29 DIM Statement
  48.             12.30 DIR Statement
  49.             12.31 DISABLE Statement
  50.             12.32 DISABLE Statement (DDE Client)
  51.             12.33 DISABLE Statement (DDE Server)
  52.             12.34 DISCONNECT Statement
  53.             12.35 DISK_INFO Function
  54.             12.36 ENABLE Statement
  55.             12.37 ENABLE Statement (DDE Client)
  56.             12.38 ENABLE Statement (DDE Server)
  57.             12.39 EOF Function
  58.             12.40 EXIT Statement
  59.             12.41 FILE_ACCESS Function
  60.             12.42 FILE_TRANSFER_STATUS Function
  61.             12.43 FOUND Function
  62.             12.44 FOUND_COLUMN Function
  63.             12.45 FOUND_ROW Function
  64.             12.46 GLOBAL Statement
  65.             12.47 GOTO Statement
  66.             12.48 HANG_UP Statement
  67.             12.49 HIDE Statement
  68.             12.50 HOST_CURSOR_COLUMN Function
  69.             12.51 HOST_CURSOR_ROW Function
  70.             12.52 IF Statement
  71.             12.53 INCLUDE Statement
  72.             12.54 INSTR Function
  73.             12.55 IS_CHECKED Function
  74.             12.56 IS_DISABLED Function
  75.             12.57 JUMP Statement
  76.             12.58 LEN Function
  77.             12.59 LOCATE HOST_CURSOR Statement
  78.             12.60 LOOK Statement
  79.             12.61 MESSAGE_BOX Function
  80.             12.62 MINIMIZE, MAXIMIZE, and RESTORE Statements
  81.             12.63 NUMBER_OF_LINES Function
  82.             12.64 ON Statement
  83.             12.65 OPEN Statement
  84.             12.66 OPEN Statement (DDE Client)
  85.             12.67 OPEN Statement (DDE Server)
  86.             12.68 OPEN_FLAG Function
  87.             12.69 PERFORM Statement
  88.             12.70 QUIET Function
  89.             12.71 READ Statement
  90.             12.72 READ_POSITION Function
  91.             12.73 RECEIVE_FILE Statement
  92.             12.74 RELEASE Statement
  93.             12.75 REMOVE FROM Statement
  94.             12.76 RESERVE Statement
  95.             12.77 RESUME Statement
  96.             12.78 RETURN Statement
  97.             12.79 ROUND Statement
  98.             12.80 RUN Statement
  99.             12.81 SCREEN Function
  100.             12.82 SCRIPT_INFO Function
  101.             12.83 SEARCH_ARRAY Statement
  102.             12.84 SELECT Statement
  103.             12.85 SELECTED_LINE Function
  104.             12.86 SEND Statement
  105.             12.87 SEND_FILE Statement
  106.             12.88 SET Statement
  107.             12.89 SET_ARRAY Statement
  108.             12.90 SHOW Statement
  109.             12.91 SIGNAL Statement
  110.             12.92 SORT Statement
  111.             12.93 STORE Statement
  112.             12.94 STR_CHR Function
  113.             12.95 STR_CURRDIR Function
  114.             12.96 STR_CURRDISK Function
  115.             12.97 STR_DATE Function
  116.             12.98 STR_DELETE Function
  117.             12.99 STR_ENVIRONMENT Function
  118.             12.100 STR_FILEPATH Function
  119.             12.101 STR_JLEFT Function
  120.             12.102 STR_JRIGHT Function
  121.             12.103 STR_LEFT Function
  122.             12.104 STR_LOWER Function
  123.             12.105 STR_MID Function
  124.             12.106 STR_PAD Function
  125.             12.107 STR_REPLICATE Function
  126.             12.108 STR_RETRIEVE Function
  127.             12.109 STR_RIGHT Function
  128.             12.110 STR_TIME Function
  129.             12.111 STR_TRANSLATE Function
  130.             12.112 STR_TRUNCATE Function
  131.             12.113 STR_UPPER Function
  132.             12.114 STR_VAL Function
  133.             12.115 SWAP Statement
  134.             12.116 TEXT_OF Function
  135.             12.117 UNCHECK Statement
  136.             12.118 VAL Function
  137.             12.119 WAIT Statement
  138.             12.120 WHILE Statement
  139.             12.121 WINDOW_HANDLE Function
  140.             12.122 WRITE Statement
  141.             12.123 WRITE_POSITION Function
  142.  
  143.  
  144.  
  145.                      12. AUTOPILOT Statement Reference                      
  146.  
  147.  
  148. This section contains the syntax of all Statements and  Functions  available
  149. within the AUTOPILOT Language.
  150.  
  151.  
  152.  
  153.  
  154.                           12.1 ACTION_ID Function                           
  155.  
  156.  
  157. Purpose:
  158.  
  159. Returns the Reference Number of the dialog window, session monitor,  or  DDE
  160. item which triggered this ACTION.
  161.  
  162. Format:
  163.  
  164.   ┌──────────────────────────────────────────────────────────────────────┐
  165.   │ ACTION_ID                                                            │
  166.   └──────────────────────────────────────────────────────────────────────┘
  167.  
  168. Remarks:
  169.  
  170. This function is used in routines that are triggered by ACTION  clauses.  It
  171. returns the ID number of the window, monitor, or DDE  item  which  triggered
  172. the current ACTION.
  173.  
  174. The ID returned depends on the type of ACTION.  For  example,  when  a  menu
  175. choice is made on a  dialog,  ACTION_ID  returns  the  ID  number  that  was
  176. specified in the AS clause of the ACTION_BAR_MENU CHOICE item.
  177.  
  178. The following table indicates what ID is return for various types of  ACTION
  179. (Action Types are listed by the number that is returned by  the  ACTION_TYPE
  180. function).
  181.  
  182. Action Type  ID Returned
  183. ───────────  ───────────────────────────────────────────────────────────────
  184.      1       Selected Action Bar menu item.
  185.      2       Close requested from the System Menu.
  186.      5       Radio Button,, Check Box,, or  Push  Button  control  that  was
  187.              pressed.
  188.      6       Entry Field or  Multiline  Entry  Field  control  that  changed
  189.              value.
  190.      7       A List Box or Combination Box control that changed value.
  191.      8       List Box or Combination Box control that was double clicked.
  192.      9       TEXT_WATCH whose text was found was found.
  193.      10      HOT_KEY_WATCH  whose key was pressed .
  194.      11      TOPIC conversation was initiated with.
  195.      12      TOPIC conversation was terminated.
  196.      13      HOT_LINK data item was received for.
  197.      14      WARM_LINK notification was received for.
  198.      15      EXPORT_ITEM that client started a HOT_LINK/WARM_LINK for.
  199.      16      EXPORT_ITEM that client ended a HOT_LINK /WARM_LINK with.
  200.      17      EXPORT_ITEM that Poke data was received for.
  201.      18      EXPORT_ITEM that a Request was received for.
  202.      19      EXPORT_COMMAND that an Execute was received for.
  203.  
  204. Example:
  205.  
  206.     SET x = ACTION_ID
  207.  
  208. See Also:
  209.  
  210.   ACTION_TYPE
  211.   ACTION_WINDOW
  212.   ACTION_OBJECT
  213.  
  214.  
  215.  
  216.  
  217.                          12.2 ACTION_INFO Function                          
  218.  
  219.  
  220. Purpose:
  221.  
  222. Returns various types of information relating to the  event  that  triggered
  223. the current ACTION.
  224.  
  225. Format:
  226.  
  227.   ┌──────────────────────────────────────────────────────────────────────┐
  228.   │ ACTION_INFO(info)                                                    │
  229.   └──────────────────────────────────────────────────────────────────────┘
  230.  
  231. Remarks:
  232.  
  233. This function is used in routines that are triggered by  ACTION  events.  It
  234. returns various types of information related to the current ACTION.
  235.  
  236. The argument info is a number that determines what type  of  information  is
  237. returned. (Note that some types of information (info =  1,2  or  3)  can  be
  238. returned with other functions.)
  239.  
  240. info=1           info=2           info=3           info=4           info=5
  241. (action_type)    (action_object)  (action_id)
  242. ───────────────  ───────────────  ───────────────  ───────────────  ───────────────
  243.     1            Dialog Window    Action Bar 
  244. Action Bar menu  ID               Pulldown or 
  245. item selected                     Choice ID  
  246.           
  247.     2
  248. Close requested  Dialog Window
  249. from System      ID
  250. Menu                  
  251.  
  252.     5
  253. Radio Button,    Dialog  Window   Radio Button,
  254. Check Box, or    ID               Check Box, or
  255. Push Button                       Push Button ID
  256. pressed      
  257.            
  258.     6            Dialog  Window   Entry Field or  
  259. Entry Field or   ID               Multiline Entry
  260. Multiline Entry                   Field ID
  261. Field changed         
  262.           
  263.     7            Dialog  Window   List Box or 
  264. List Box or      ID               Combination Box 
  265. Combination Box                   ID
  266. changed            
  267.           
  268.     8            Dialog  Window   List Box or 
  269. List Box or      ID               Combination Box 
  270. Combination Box                   ID
  271. double clicked         
  272.           
  273.     9            Session Monitor  Text Watch ID
  274. Text in Text     ID
  275. Watch found                         
  276.           
  277.    10            session_monitor  Host Key Watch ID  
  278. Key in Host Key 
  279. Watch pressed                     
  280.           
  281.    11            dde_link         Topic ID
  282. DDE 
  283. conversation 
  284. initiated                                  
  285.           
  286.    12            dde_link         Topic ID
  287. DDE 
  288. conversation 
  289. terminated                                 
  290.           
  291.    13            dde_link         Hot Link ID
  292. Hot Link data 
  293. item received                                 
  294.           
  295.    14            dde_link         Warm Link ID
  296. Warm Link 
  297. data item 
  298. changed                                 
  299.           
  300.    15            dde_link         Export Item ID   Item Name
  301. Client started 
  302. a Hot Link or  
  303. Warm Link                    
  304.                                           
  305.    16            dde_link         Export Item ID   Item Name 
  306. Client 
  307. terminated 
  308. a Hot Link or  
  309. Warm Link              
  310.           
  311.    17            dde_link         Export Item ID   Item Name       Poked data
  312. Poke data item 
  313. received                                     
  314.           
  315.    18            dde_link         Export Item ID   Item Name
  316. Request item 
  317. received                                       
  318.  
  319.    19            dde_link         Export Command   Command Data
  320. Execute command                   ID
  321. received                                    
  322.  
  323.  
  324.  
  325.                         12.3 ACTION_OBJECT Function                         
  326.  
  327.  
  328. Purpose:
  329.  
  330. Returns the id number of the window,  session  monitor,  of  DDE  link  that
  331. triggered an ACTION.
  332.  
  333. Format:
  334.  
  335.   ┌──────────────────────────────────────────────────────────────────────┐
  336.   │ ACTION_OBJECT                                                        │
  337.   └──────────────────────────────────────────────────────────────────────┘
  338.  
  339. Remarks:
  340.  
  341. This function is used in routines that are triggered by ACTION  clauses.  It
  342. returns the number of the DIALOG_WINDOW,  TEXT_WINDOW,  SESSION_MONITOR,  or
  343. DDE_LINK that triggered the current ACTION.
  344.  
  345. In conjunction with  ACTION_TYPE  and  ACTION_ID,  this  function  allows  a
  346. common routine to handle a variety of actions by allowing you to  query  the
  347. item that has been selected.
  348.  
  349. Example:
  350.  
  351.   SET x = ACTION_OBJECT
  352.  
  353. See Also:
  354.  
  355.   ACTION_TYPE
  356.   ACTION_ID
  357.  
  358.  
  359.  
  360.                          12.4 ACTION_TYPE Function                          
  361.  
  362. Purpose:
  363.  
  364. Returns an indication of what caused the  ACTION  specified  for  a  window,
  365. session monitor, or DDE item.
  366.  
  367. Format:
  368.  
  369.   ┌──────────────────────────────────────────────────────────────────────┐
  370.   │ ACTION_TYPE                                                          │
  371.   └──────────────────────────────────────────────────────────────────────┘
  372.  
  373. Remarks:
  374.  
  375. This function is used in routines that are triggered by ACTION  clauses.  It
  376. indicates the reason why a window, session monitor, or  DDE  item  triggered
  377. the current ACTION.
  378.  
  379. Returns  Source             Cause
  380. ───────  ─────────────────  ────────────────────────────────────────────────
  381. 1        Dialog             Action Bar menu item selected.
  382. 2        Dialog             Close requested from the System Menu.
  383. 5        Dialog             A Radio Button,,  Check  Box,,  or  Push  Button
  384.                             control was pressed.
  385. 6        Dialog             An Entry Field or Multiline Entry Field  control
  386.                             changed value.
  387. 7        Dialog             A List Box or Combination  Box  control  changed
  388.                             value.
  389. 8        Dialog             A mouse double click has been sensed on  a  List
  390.                             Box or Combination Box control.
  391. 9        Session Monitor    The text specified in a  TEXT_WATCH  clause  was
  392.                             found.
  393. 10       Session Monitor    The key specified in a HOT_KEY_WATCH clause  was
  394.                             pressed.
  395. 11       DDE (Server only)  A DDE conversation was  initiated  by  a  Client
  396.                             application.
  397. 12       DDE                A DDE conversation was terminated by  the  other
  398.                             application.
  399. 13       DDE (Client only)  A HOT_LINK data item was received.
  400. 14       DDE (Client only)  A WARM_LINK notification was received.
  401. 15       DDE (Server only)  A Client started a HOT_LINK or WARM_LINK.
  402. 16       DDE (Server only)  A Client terminated a HOT_LINK or WARM_LINK.
  403. 17       DDE (Server only)  A Poke data item was received.
  404. 18       DDE (Server only)  A Request item was received.
  405. 19       DDE (Server only)  An Execute command was received.
  406.  
  407. Example:
  408.  
  409.   IF ACTION_TYPE = 1 GOTO do_actionbar
  410.   IF ACTION_TYPE = 2 GOTO do_sysmenu
  411.  
  412. See Also:
  413.  
  414.   ACTION_ID
  415.   ACTION_OBJECT
  416.  
  417.  
  418.  
  419.  
  420.                         12.5 ACTION_WINDOW Function                         
  421.  
  422.  
  423. Purpose:
  424.  
  425. Returns the window number of the window that triggered an ACTION.
  426.  
  427. Format:
  428.  
  429.   ┌──────────────────────────────────────────────────────────────────────┐
  430.   │ ACTION_WINDOW                                                        │
  431.   └──────────────────────────────────────────────────────────────────────┘
  432.  
  433. Remarks:
  434.  
  435. This  function  is  used  with  Action  Bar  Menus  created  with  the
  436. ACTION_BAR_MENU clause in the CREATE TEXT_WINDOW Statement.  It is  used  in
  437. routines that are triggered by  ACTIONs  indicated  for  PULLDOWN  menus  to
  438. return the <window-number> specified on the CREATE DIALOG_WINDOW Statement.
  439.  
  440. In conjunction with  ACTION_TYPE  and  ACTION_ID,  this  function  allows  a
  441. common routine to handle a variety of Action Bars and Action  Bar  Items  by
  442. allowing you to query the item that has been selected.
  443.  
  444. Example:
  445.  
  446.     SET x = ACTION_WINDOW
  447.  
  448. See Also:
  449.  
  450.   ACTION_TYPE
  451.   ACTION_ID
  452.  
  453.  
  454.  
  455.  
  456.                            12.6 ADD TO Statement                            
  457.  
  458.  
  459. Purpose:
  460.  
  461. This statement is used to add  various  items  to  window  objects,  session
  462. monitors and DDE LINK objects.
  463.  
  464. Format:
  465.  
  466.   ┌──────────────────────────────────────────────────────────────────────┐
  467.   │ Dialog Windows:                                                      │
  468.   │                                                                      │
  469.   │ ADD TO DIALOG_WINDOW (winid)                                         │
  470.   │      [ TITLE_BAR <title-string> ]                                    │
  471.   │      [ SYSTEM_MENU ]                                                 │
  472.   │      [ MINIMIZE_BUTTON ]                                             │
  473.   │      [ MAXIMIZE_BUTTON ]                                             │
  474.   │      [ TASK_LIST ]                                                   │
  475.   │      [ ACTION_BAR_MENU clause ]                                      │
  476.   │      [ TEXT_FIELD clause ]                                           │
  477.   │      [ ENTRY_FIELD clause ]                                          │ 
  478.   │      [ MULTILINE_ENTRY_FIE LD clause ]                               │
  479.   │      [ PUSH_BUTTON clause ]                                          │
  480.   │      [ RADIO_BUTTON clause ]                                         │
  481.   │      [ CHECK_BOX clause ]                                            │
  482.   │      [ LIST_BOX clause ]                                             │
  483.   │      [ COMBINATION_BOX  clause ]                                     │
  484.   │      [ GROUP_BOX clause ]                                            │
  485.   │      [ ICON_FIELD clause ] ...                                       │
  486.   │                                                                      │
  487.   │ ADD TO { LIST_BOX(id)      }                                         │
  488.   │        { COMBINATION_B OX(id) }                                      │
  489.   │         [ IN DIALOG_WINDOW (winid) ]                                 │
  490.   │    LINES  {<string-expression> } [SELECTED] [AT <pos> ]              │
  491.   │           {<array range>    } ...                                    │
  492.   │                                                                      │
  493.   │ ADD TO MULTILINE_ENTRY_FIELD (id)                                    │
  494.   │       [ IN DIALOG_WINDOW (winid) ]                                   │
  495.   │   LINES  {<string-expression> } [AT <pos> ] ...                      │
  496.   │          {<array range>    }                                         │
  497.   │                                                                      │
  498.   │ ADD TO ACTION_BAR_MENU [ {IN DIALOG_WINDOW (winid)} ]                │
  499.   │                        [ {IN TEXT_WINDOW(winid)  } ]                 │
  500.   │      PULLDOWN clause [ BEFORE PULLDOWN (id) ]                        │
  501.   │                      [ AFTER PULLDOWN(id)  ]                         │
  502.   │        [ CHOICE  clause [ SEPARATOR clause  ...] ...                 │
  503.   │                                                                      │
  504.   │ ADD TO PULLDOWN(id) [ {IN DIALOG_WINDOW (winid)}    ]                │
  505.   │                     [ {IN TEXT_WINDOW(winid)  }   ]                  │
  506.   │     {CHOICE  claus    } [BEFORE {CHOICE(id)   } ] ...                │
  507.   │     {SEPARATOR clause } [AFTER  {SEPARATOR(id)}  ]                   │
  508.   └──────────────────────────────────────────────────────────────────────┘
  509.   ┌──────────────────────────────────────────────────────────────────────┐
  510.   │ Text Windows:                                                        │
  511.   │                                                                      │
  512.   │ ADD TO TEXT_WINDOW (winid)                                           │
  513.   │      [ TITLE_BAR <title-string> ]                                    │
  514.   │      [ SYSTEM_MENU ]                                                 │
  515.   │      [ MINIMIZE_BUT TON ]                                            │
  516.   │      [ MAXIMIZE_BUTTON ]                                             │
  517.   │      [ HORIZONTAL_SCROLL_BAR ]                                       │
  518.   │      [ VERTICAL_SCRO LL_BAR ]                                        │
  519.   │      [ TASK_LIST ]                                                   │
  520.   │      [ ACTION_BAR_MENU clause ] ...                                  │
  521.   └──────────────────────────────────────────────────────────────────────┘
  522.   ┌──────────────────────────────────────────────────────────────────────┐
  523.   │ Session Monitors:                                                    │
  524.   │                                                                      │
  525.   │ ADD TO SESSION_MONITOR (monitorid)                                   │
  526.   │       [ TEXT_WATCH text                                              │
  527.   │         [ ENABLED|DISABLED ]                                         │
  528.   │         [ AT | FROM | TO clause(s) ]                                 │
  529.   │         [ ACTION label ]                                             │
  530.   │         [ AS id ]           ]  ...                                   │
  531.   │      [ HOST_KEY_WATCH key                                            │
  532.   │         [ ENABLED|DISABLED ]                                         │
  533.   │         [ ACTION label ]                                             │
  534.   │         [ AS id ]                                                    │
  535.   └──────────────────────────────────────────────────────────────────────┘
  536.   ┌──────────────────────────────────────────────────────────────────────┐
  537.   │ DDE Links:                                                           │
  538.   │                                                                      │
  539.   │ Format 1:                                                            │
  540.   │  ADD TO DDE_LINK(linkid )                                            │
  541.   │     [ TOPIC  clause-n ] ...                                          │
  542.   │                                                                      │
  543.   │  Topic clause for ADD TO DDE_LINK (Client):                          │
  544.   │                                                                      │
  545.   │  TOPIC topicname [ ACTION label ] [ ENABLED|DISABLED ]               │
  546.   │    [ AS id ] [ HOT_LINK|WARM_LINK clause-n ] ...                     │
  547.   │                                                                      │
  548.   │   Topic clause for ADD TO  DDE_LINK(Server):                         │
  549.   │                                                                      │
  550.   │  TOPIC topicname [ ACTION label  ] [ ENABLED|DISABLED ]              │
  551.   │    [ AS id ] [ EXPORT_ITEM|EXPORT_COMMAND clause ] ...               │
  552.   │                                                                      │
  553.   │ Format 2:                                                            │
  554.   │  ADD TO TOPIC(id ) [ IN DDE_LINK(linkid ) ]                          │
  555.   │     [ HOT_LINK|WARM_LINK clause-n ]...                               │
  556.   │                                                                      │
  557.   │ Format 3:                                                            │
  558.   │  ADD TO TOPIC(id) [ IN DDE_LINK(linkid ) ]                           │
  559.   │    [ EXPORT_ITEM|EXPORT_COMMAND clause ] ...                         │
  560.   └──────────────────────────────────────────────────────────────────────┘
  561.  
  562. Remarks:
  563.  
  564. For Dialog And Text Window Items:
  565.  
  566. Items added after a window has been OPENed will appear immediately with  the
  567. following  exception:  dialog  controls  that  are  added  to  an  OPENed
  568. DIALOG_WINDOW will not appear unless the window is CLOSEd and reOPENed.
  569.  
  570. Refer to the CREATE DIALOG_WINDOW for the formats of the individual  clauses
  571. used in this Statement.  For more information on CREATE  TEXT_WINDOW,  refer
  572. to the Appendix, Migration From DOS.
  573.  
  574. For Session Monitor Items:
  575.  
  576. monitorid
  577.      must  be  the  id  of  a  session  monitor  object  created  by  CREATE
  578.      SESSION_MONITOR.
  579.  
  580. The TEXT_WATCH clause is specified in the  same  format  as  in  the  CREATE
  581. SESSION_MONITOR statement.
  582.  
  583. TEXT_WATCH can be added to a session monitor that is opened or closed.
  584.  
  585. The HOST_KEY_WATCH clause is specified in the same format as in  the  CREATE
  586. SESSION_MONITOR statement.
  587.  
  588. HOST_KEY_WATCH can be added to a session monitor that is opened or closed.
  589.  
  590.  
  591. For DDE_LINK Objects:
  592.  
  593. Format 1 adds a TOPIC definition (with associated  entries)  to  a  DDE_LINK
  594. object. The TOPIC is not opened.
  595.  
  596. Format 2 adds HOT_LINK and/or WARM_LINK items to a TOPIC definition. If  the
  597. TOPIC is opened and enabled, an advise transaction  will  be  generated  for
  598. all enabled HOT_LINK and WARM_LINK items that are added.
  599.  
  600. Format  3  adds  EXPORT_ITEM  and/or  EXPORT_COMMAND  entries  to  a  TOPIC
  601. definition. If the TOPIC is enabled, the server  script  will  accept  poke,
  602. request, and advise transactions  for  the  EXPORT_ITEM  entry  and  execute
  603. transactions for the EXPORT_COMMAND entries.
  604.  
  605.  
  606. DDE_LINK Examples:
  607.  
  608.   ADD TO DDE_LINK(1)
  609.   TOPIC "sheet1" AS 1
  610.   ADD TO TOPIC(1)
  611.   HOT_LINK "R1C1" INTO myvar ACTION myrtn AS 1
  612.  
  613.  
  614. See Also:
  615.  
  616. CREATE DIALOG_WINDOW
  617. CREATE SESSION_MONITOR
  618. REMOVE FROM
  619.  
  620.  
  621.  
  622.  
  623.                              12.7 ASC Function                              
  624.  
  625.  
  626. Purpose:
  627.  
  628. Returns the ASCII code of a character.
  629.  
  630. Format:
  631.  
  632.   ┌──────────────────────────────────────────────────────────────────────┐
  633.   │ ASC(<string>)                                                        │
  634.   └──────────────────────────────────────────────────────────────────────┘
  635.  
  636. Remarks:
  637.  
  638. This function will return the ASCII  code  for  the  first  character  in  a
  639. string.
  640.  
  641. Example:
  642.  
  643.         SET x = ASC("ABC")
  644.  
  645. In this example, "x" would be equal to 65.
  646.  
  647. See Also:
  648.  
  649.   STR_VAL
  650.  
  651.  
  652.  
  653.  
  654.                           12.8 ATTRIBUTE Function                           
  655.  
  656.  
  657. Purpose:
  658.  
  659. Test host screen attribute.
  660.  
  661. Format:
  662.  
  663.   ┌──────────────────────────────────────────────────────────────────────┐
  664.   │ ATTRIBUTE AT <row> , <col>                                           │
  665.   └──────────────────────────────────────────────────────────────────────┘
  666.  
  667. Remarks:
  668.  
  669. This  function  returns  the  attribute  associated  with  the  host  screen
  670. position indicated by the AT clause.
  671.  
  672. The actual value returned by this function  is  dependent  on  the  type  of
  673. emulation being done. This value may be  easily  tested  using  the  IS  and
  674. ISNOT operators which are defined in this manual. ATTRIBUTE test values  for
  675. AUTOPILOT supported emulation types are defined in the file TT3278.INC.
  676.  
  677. The appropriate file may be INCLUDEd in the program  prior  to  testing  the
  678. ATTRIBUTEs.
  679.  
  680. Example:
  681.  
  682.     INCLUDE "TT3278.INC"
  683.  
  684.       (statement-1)
  685.       (statement-2)
  686.       (statement-n)
  687.  
  688.     IF ATTRIBUTE AT 10 , 5 IS _BRIGHT GOTO label
  689.  
  690. In this example, _BRIGHT is defined in TT3278.INC and if  the  ATTRIBUTE  at
  691. row 10, column 5 is what corresponds to the defined _BRIGHT  then  the  GOTO
  692. is executed.
  693.  
  694.  
  695.  
  696.  
  697.                             12.9 BEEP Statement                             
  698.  
  699.  
  700. Purpose:
  701.  
  702. Beeps the speaker.
  703.  
  704. Format:
  705.  
  706.   ┌──────────────────────────────────────────────────────────────────────┐
  707.   │ BEEP [frequency,time]                                                │
  708.   └──────────────────────────────────────────────────────────────────────┘
  709.  
  710. Remarks:
  711.  
  712. The BEEP Statement sounds the PC speaker at the indicated frequency for  the
  713. specified period of time.  If frequency and time are not specified, 1024  Hz
  714. for 1/10 second is used.
  715.  
  716. Remarks:
  717.  
  718.     IF ERR  3 BEEP
  719.  
  720. In this example, the program checks to see if ERR is greater than 3.  If  it
  721. is, the computer beeps.
  722.  
  723.  
  724.  
  725.  
  726.                           12.10 CARRIER Statement                           
  727.  
  728.  
  729. Purpose:
  730.  
  731. Tests the presence of the Carrier Detect signal.
  732.  
  733. Format:
  734.  
  735.   ┌──────────────────────────────────────────────────────────────────────┐
  736.   │ CARRIER                                                              │
  737.   └──────────────────────────────────────────────────────────────────────┘
  738.  
  739. Remarks:
  740.  
  741. This  function  tests  the  presence  of  the  carrier  detect  signal  in
  742. asynchronous communications. It  returns  a  1  (true)  if  the  carrier  is
  743. present (i.e. a call is in progress) and a 0 (false) if the carrier  is  not
  744. present (i.e. the call is disconnected).
  745.  
  746. The CARRIER function always returns a 1 (true) if the emulation type is  not
  747. asynchronous.
  748.  
  749. Example:
  750.  
  751.     IF NOT CARRIER 
  752.     DISPLAY "The telephone connection has been disconnected"
  753.  
  754. See Also:
  755.  
  756.   DIAL
  757.   HANG_UP
  758.  
  759.  
  760.  
  761.                            12.11 CHECK Statement                            
  762.  
  763.  
  764. Purpose:
  765.  
  766. The CHECK Statement allows the script to place a check mark in  front  of  a
  767. menu CHOICE or to "check" a RADIO_BUTTON or CHECK_BOX dialog control.
  768.  
  769. Format:
  770.  
  771.   ┌──────────────────────────────────────────────────────────────────────┐
  772.   │ CHECK {RADIO_BUTTON (id)  }                                          │
  773.   │       {CHECK_BOX(id)    }                                            │
  774.   │          [ IN DIALOG_WINDOW (winid) ]                                │
  775.   │                                                                      │
  776.   │ CHECK {CHOICE (id)    } [ {IN DIALOG_WINDOW (winid)} ]               │
  777.   │                         [ {IN TEXT_WINDOW     } ]                    │
  778.   └──────────────────────────────────────────────────────────────────────┘
  779.  
  780. Remarks:
  781.  
  782. If a RADIO_BUTTON or CHECK_BOX is CHECKed,  the  result  of  the  IS_CHECKED
  783. Function will be 1 (TRUE).
  784.  
  785. See Also:
  786.  
  787.   IS_CHECKED
  788.   UNCHECK
  789.  
  790.  
  791.  
  792.  
  793.                            12.12 CLOSE Statement                            
  794.  
  795.  
  796. Purpose:
  797.  
  798. Concludes I/O to a file or device, closes dialog and  text  windows  created
  799. with the CREATE Statement and  Session  Monitors  created  with  the  CREATE
  800. SESSION_MONITOR Statement.  It also ends  a  conversations  created  with  a
  801. CREATE DDE_LINK Statement.
  802.  
  803. Format:
  804.  
  805.   ┌──────────────────────────────────────────────────────────────────────┐
  806.   │ File Processing:                                                     │
  807.   │  CLOSE <filenum>                                                     │
  808.   │                                                                      │
  809.   │ Dialog Windows:                                                      │
  810.   │  CLOSE DIALOG_WINDOW <window_number>                                 │
  811.   │                                                                      │
  812.   │ Text Windows:                                                        │
  813.   │  CLOSE TEXT_WINDOW <window_number>                                   │
  814.   │                                                                      │
  815.   │ Session Monitors:                                                    │
  816.   │  CLOSE SESSION_MONITOR (monitorid)                                   │
  817.   │                                                                      │
  818.   │ DDE Links:                                                           │
  819.   │  Format 1:                                                           │
  820.   │  CLOSE TOPIC(id ) [ IN DDE_LINK(linkid) ]                            │
  821.   │                                                                      │
  822.   │  Format 2:                                                           │
  823.   │  CLOSE DDE_LINK(linkid)                                              │
  824.   └──────────────────────────────────────────────────────────────────────┘
  825.  
  826. Remarks:
  827.  
  828. <filenum>
  829.      is the number used on the OPEN Statement.  The  association  between  a
  830.      particular file and its file number stops when the CLOSE  Statement  is
  831.      executed. When a file opened for OUTPUT or APPEND is CLOSEd, an End  Of
  832.      File Mark IS NOT written.
  833.  
  834. <window_number>
  835.      is the real number or identifier used  in  the  CREATE  TEXT_WINDOW  or
  836.      CREATE DIALOG_WINDOW Statement.  For more information on text  windows,
  837.      refer to the Appendix, Migration From DOS.
  838.  
  839. monitorid
  840.      must  be  the  id  of  a  session  monitor  object  created  by  CREATE
  841.      SESSION_MONITOR.  A session monitor is not active  after  it  has  been
  842.      closed.
  843.  
  844. CLOSE TOPIC(id ) ends a  conversation  with  a  DDE  server  for  the  TOPIC
  845. specified.  This format is only valid for DDE clients.
  846.  
  847. CLOSE DDE_LINK(linkid ) ends a conversation with ALL TOPICs  in  a  DDE_LINK
  848. definition.  This format is valid for DDE clients and servers.    If  issued
  849. on a DDE server, the server will no longer respond  to  client  requests  to
  850. start conversations.
  851.  
  852. Example (File Close):
  853.  
  854.       OPEN "inpfile.ext" FOR INPUT AS infile
  855.       OPEN "outfile.ext" FOR OUTPUT AS outfile
  856.  
  857.     loop:
  858.       READ LINE infile var
  859.       IF EOF(infile) GOTO end
  860.       WRITE LINE outfile var
  861.       GOTO loop
  862.     end:
  863.       CLOSE infile
  864.       CLOSE outfile
  865.  
  866. This  example  would  copy  the  text  file  "inpfile.ext"  to  the  file
  867. "outfile.ext". Note that if outfile was not  CLOSED  an  end  of  file  mark
  868. would not have been written.
  869.  
  870.  
  871. Example (Dialog Close):
  872.  
  873.       create dialog_window my_dialog
  874.             .
  875.             .
  876.             .
  877.       end_create
  878.             .
  879.       open DIALOG_WINDOW my_dialog
  880.             .
  881.             .
  882.       close DIALOG_WINDOW my_dialog
  883.  
  884.  
  885. Example (DDE_LINK):
  886.  
  887.   CLOSE TOPIC(1)
  888.  
  889.   CLOSE TOPIC(1) IN DDE_LINK(2)
  890.  
  891.   CLOSE DDE_LINK(1)
  892.  
  893. See Also:
  894.  
  895.   EOF
  896.   OPEN
  897.   OPEN_FLAG
  898.   READ
  899.   WRITE
  900.  
  901.   CREATE DIALOG_WINDOW
  902.   CREATE TEXT_WINDOW
  903.   CREATE DDE_LINK
  904.  
  905.  
  906.  
  907.  
  908.                           12.13 CLS HOST Statement                          
  909.  
  910.  
  911. Purpose:
  912.  
  913. Clears the buffer associated with the current asynchronous host screen.
  914.  
  915. Format:
  916.  
  917.   ┌──────────────────────────────────────────────────────────────────────┐
  918.   │ CLS HOST                                                             │
  919.   └──────────────────────────────────────────────────────────────────────┘
  920.  
  921. Remarks:
  922.  
  923. The CLS HOST Statement is for asynchronous communications only.   It  clears
  924. the Host Screen buffer and positions the cursor at row 1, column  1.    Data
  925. is then displayed from that point.
  926.  
  927. CLS HOST may be used with any type of asynchronous communications.  However,
  928. if the data is  not  being  displayed  in  a  TTY-like  fashion  (no  screen
  929. positioning sequences other than CR and LF), care must be taken since  hosts
  930. tend to build the next screen based on  what  it  thinks  is  already  being
  931. displayed.
  932.  
  933. CLS HOST is generally used to simplify WAIT and LOOK FORs  during  TTY  like
  934. prompting sequences where the  changes  in  the  screen  after  each  prompt
  935. already appear on the screen.
  936.  
  937.  
  938.  
  939.  
  940.                      12.14 CONNECT and JUMP Statements                      
  941.  
  942.  
  943. Purpose:
  944.  
  945. Direct subsequent program statements to interact with a specified session.
  946.  
  947. Format:
  948.  
  949.   ┌──────────────────────────────────────────────────────────────────────┐
  950.   │ CONNECT TO SESSION <session>                                         │
  951.   │                                                                      │
  952.   │ JUMP TO SESSION   <session>                                          │
  953.   └──────────────────────────────────────────────────────────────────────┘
  954.  
  955. Remarks:
  956.  
  957. <session>
  958.       is a single letter EHLLAPI session-id or the 2 to 8 character  EHLLAPI
  959.       session-name of the session to receive control
  960.  
  961. CONNECT and JUMP direct subsequent program statements  to  interact  with  a
  962. specified session.  ALL subsequent communications commands (SEND, WAIT  FOR,
  963. SCREEN, etc.) will be directed to this session.  Only  one  EHLLAPI  session
  964. may be CONNECT'ed at any one time.
  965.  
  966. When CONNECT is  used,  the  connection  to  the  requested  SESSION  occurs
  967. internally and the AUTOPILOT application continues as the active window.
  968.  
  969. If JUMP is used, the connection to the requested SESSION  occurs  physically
  970. and the specified session becomes the active one.
  971.  
  972. If the CONNECT or JUMP Statement is successful, the RETURN_CODE  is  set  to
  973. 0. If the CONNECT  is  unsuccessful,  the  RETURN_CODE  is  set  to  1.  For
  974. example, the RETURN_CODE would be set to 1  if  an  attempt  to  CONNECT  TO
  975. SESSION "C" were issued and a session "C" did not exist.  It is  recommended
  976. that you ALWAYS test RETURN_CODE after returning  from  a  CONNECT  or  JUMP
  977. Statement.
  978.  
  979. WARNING:
  980.      In order for  CONNECT  or  JUMP  to  function  properly  by  specifying
  981.      session-id for a TalkThru session, the TalkThru session must have  been
  982.      loaded for EHLLAPI Support.  For more information on  what  this  means
  983.      and how it is accomplished, refer to the Chapter, EHLLAPI Support.   If
  984.      you specify the longer session-name, this restriction is not valid.
  985.  
  986.  
  987. Example:
  988.  
  989. The following segment of code will CONNECT to  host  session-id  A,  send  a
  990. LOGON sequence and then JUMP to the session.
  991.  
  992.     connect to SESSION "A"
  993.     send "logon userid/password" , enter
  994.     wait for "Ready;"
  995.     jump to SESSION "A"
  996.  
  997.  
  998.  
  999.  
  1000.                        12.15 COPY_FROM_HOST Statement                       
  1001.  
  1002.  
  1003. Purpose:
  1004.  
  1005. Copies a portion of the HOST screen into an identifier. May also be used  to
  1006. copy a multiple line rectangular portion of the HOST screen into an array.
  1007.  
  1008. Format:
  1009.  
  1010.   ┌──────────────────────────────────────────────────────────────────────┐
  1011.   │ COPY_FROM_HOST [ FROM row,col ] [ TO row,col ]                       │
  1012.   │          INTO identifier [ format options ] [, ...]                  │
  1013.   │                                                                      │
  1014.   │ COPY_FROM_HOST [ FROM row,col ] [TO row,col  ]                       │
  1015.   │        INTO array [ array range ]  [ format options ]                │
  1016.   │                            [, ...]                                   │
  1017.   └──────────────────────────────────────────────────────────────────────┘
  1018.  
  1019.  
  1020. Remarks:
  1021.  
  1022. The optional FROM row,col and TO row,col  clauses  specify  the  rectangular
  1023. portion of the HOST screen to copy. If FROM... is not  specified,  the  copy
  1024. will start from row 1 column 1. If TO... is not specified the COPY will  end
  1025. at the last character position on the screen.
  1026.  
  1027. identifier
  1028.      is the name of the identifier that receives the copied portion  of  the
  1029.      screen as a string. If the copy operation spans more than one row,  the
  1030.      strings are concatenated together.
  1031.  
  1032. array
  1033.    is the name of an array that receives the copied portion  of  the  screen
  1034.    as a series of strings--one string per row copied. Each string is  copied
  1035.    into a separate array element.
  1036.  
  1037. array range
  1038.      optionally specifies a starting and/or ending point in the  destination
  1039.      array when copying one or more lines: The  range  specification  is  in
  1040.      the format:
  1041.  
  1042.         ( [ FROM indices ] [ TO indices  ] )
  1043.  
  1044.      If FROM is not included,  strings  are  copied  into  the  first  array
  1045.      element. If TO is not included strings are copied up to the last  array
  1046.      element.
  1047.  
  1048. format options
  1049.        are optional  keywords  that  specify  automatic  formatting  of  the
  1050.        string. They may include one or more of the following:
  1051.  
  1052.   TRUNCATE
  1053.           Truncate trailing spaces
  1054.   UPPER or LOWER
  1055.           Convert case
  1056.   LEFT or RIGHT
  1057.           Left or Right Justify
  1058.  
  1059. More than 1 copy operation can be specified within a  single  COPY_FROM_HOST
  1060. statement. Combining copies into one can significantly  increase  the  speed
  1061. of the copies.
  1062.  
  1063. Examples:
  1064.  
  1065. ; Copy the entire screen into an identifier x
  1066.     COPY_FROM_HOST INTO x
  1067.  
  1068. ; Copy columns 10 through 20 from each row into an
  1069. ; array and convert to upper case
  1070.     DIM array[24]
  1071.     COPY_FROM_HOST FROM 1,10 TO 24,20 INTO array UPPER
  1072. ;Perform multiple copy operations within 1 statement:
  1073.     COPY_FROM_HOST FROM 2,5 TO 2,20 INTO a ,
  1074.     FROM 4,20 TO 4,50 INTO b ,
  1075.     FROM 12,15 TO 12,80 INTO c
  1076.  
  1077.  
  1078.  
  1079.  
  1080.                         12.16 COPY_TO_HOST Statement                        
  1081.  
  1082.  
  1083. Purpose:
  1084.  
  1085. Sends a string of characters to the specified row and column of the  current
  1086. host screen. May also be used to copy multiple strings from an array to  the
  1087. host in a single operation.
  1088.  
  1089. Format:
  1090.  
  1091.   ┌──────────────────────────────────────────────────────────────────────┐
  1092.   │ COPY_TO_HOST string [ AT row, col ]                                  │
  1093.   │             [ NORESTORE ] [ USING keylist ]                          │
  1094.   │                                                                      │
  1095.   │ COPY_TO_HOST array [ array  range   ] [ AT row,col ]                 │
  1096.   │             [ NORESTORE ] [ USING keylist ]                          │
  1097.   └──────────────────────────────────────────────────────────────────────┘
  1098.  
  1099. Remarks:
  1100.  
  1101. string
  1102.      is an expression that consists of the characters to be  copied  to  the
  1103.      current host session.
  1104.  
  1105. array
  1106.      is the name of an array that contains one or more strings to be  copied
  1107.      to the current host session.
  1108.  
  1109. array range
  1110.      optionally specifies a starting  and/or  ending  point  in  the  source
  1111.      array when copying one or more lines: The  range  specification  is  in
  1112.      the format:
  1113.  
  1114.             ( [ FROM indices ] [ TO indices ] )
  1115.  
  1116.      If FROM is not included,  strings  are  copied  from  the  first  array
  1117.      element. If TO is not included strings are copied up to the last  array
  1118.      element.
  1119.  
  1120. AT row,col
  1121.      optionally specifies a row and column to begin copying  string  at.  If
  1122.      an array is specified as the source, the  AT  clause  can  be  used  to
  1123.      specify the row and column of the first string copied.
  1124.  
  1125. NORESTORE
  1126.       can be used to inhibit the default action of restoring the  cursor  at
  1127.       the original cursor position when  the  copy  is  finished.  This  can
  1128.       significantly improve performance.  It  is  ignored  for  non-TalkThru
  1129.       sessions.
  1130.  
  1131. USING keylist
  1132.       can optionally be specified to list the key(s) to be sent  after  each
  1133.       string is copied.
  1134.       When copying multiple fields from an array, the USING statement  would
  1135.       be used to list the key(s) necessary to navigate to  the  next  field.
  1136.       If not specified, the cursor will be positioned to  the  next  row  in
  1137.       the same column as the start of the previous field.
  1138.  
  1139. Examples:
  1140.  
  1141. ;Copy a single field at the current cursor position
  1142.     COPY_TO_HOST "userid"
  1143.  
  1144. ;Copy a single field at a specific cursor position
  1145. ;and don't restore the cursor to its original position
  1146.     COPY_TO_HOST "userid" AT 2,1 NORESTORE
  1147.  
  1148. ;Copy several fields at one time using TAB to go from
  1149. ;1 field to the next
  1150.     DIM array(5) = "Fld 1" , "Fld 2" , "Fld 3" , "Fld 4" , "Fld 5"
  1151.     COPY_TO_HOST array FROM 1 TO 3 AT 2 , 10 USIN G TAB
  1152.  
  1153.  
  1154.  
  1155.  
  1156.                   12.17 CREATE DDE_LINK Statement (Client)                  
  1157.  
  1158.  
  1159. Purpose:
  1160.  
  1161. Defines a link between a DDE client  (AUTOPILOT)  and  a  DDE  Server  (some
  1162. other application, possibly AUTOPILOT).   Used  in  conjunction  with  OPEN,
  1163. CLOSE, DESTROY to establish a DDE conversation.
  1164.  
  1165. Format:
  1166.  
  1167.   ┌──────────────────────────────────────────────────────────────────────┐
  1168.   │ CREATE DDE_LINK linkid                                               │
  1169.   │   CLIENT application                                                 │
  1170.   │   [ ACTION label ]                                                   │
  1171.   │   [ TOPIC clause-n ]                                                 │
  1172.   │ END_CREATE                                                           │
  1173.   │                                                                      │
  1174.   │ Topic clause for CREATE DDE_LINK:                                    │
  1175.   │                                                                      │
  1176.   │  TOPIC topicname [ ACTION label ] [ ENABLED|DISABLED ]               │
  1177.   │                             [ AS id ]                                │
  1178.   │   [ HOT_LINK itemname INTO variable [ ACTION label ]                 │
  1179.   │     [ ENABLED|DISABLED ] [ AS id ] ] ...                             │
  1180.   │   [ WARM_LINK itemname [ ACTION label ]                              │
  1181.   │     [ ENABLED|DISABLED ] [ AS id ] ]...                              │
  1182.   └──────────────────────────────────────────────────────────────────────┘
  1183.  
  1184. Remarks:
  1185.  
  1186. This statement defines a DDE link between a client  (the  AUTOPILOT  script)
  1187. and a DDE server.  A definition merely defines the components of a  link  --
  1188. it does not actually initiate a conversation (see  OPEN DDE_LINK).
  1189.  
  1190. The linkid argument may be either:
  1191.  
  1192.   o An integer expression between 1 and 30.
  1193.   o An identifier set to zero.  If this is the case, the identifier will  be
  1194.     set to an unused link id.
  1195.  
  1196. The CLIENT clause indicates that this DDE_LINK is to act as  a  DDE  client.
  1197. The  Application  argument  specifies  the  name  of  the  desired  server
  1198. application you wish to converse with.  It is required and  may  occur  only
  1199. once in each DDE_LINK definition.
  1200.  
  1201. The ACTION label clause allows you to specify  a  label  in  your  AUTOPILOT
  1202. program to receive control if one of the following events occur:
  1203.  
  1204.   o A DDE conversation is ended by the server.
  1205.  
  1206.   o A HOT_LINK or WARM_LINK  item  with  no  associated  ACTION  routine  is
  1207.     updated by the server.
  1208.  
  1209. The TOPIC clause defines a desired topic for  a  DDE  conversation  and  any
  1210. HOT_LINKS or WARM_LINKS associated with that topic.   A  DDE_LINK  may  have
  1211. more than TOPIC  clause.
  1212.  
  1213. The HOT_LINK  clause defines a 'hot' advise  link  for  the  item  named  by
  1214. itemname.  Whenever the data associated with the HOT_LINK  is  changed,  the
  1215. data is sent to the client by the server. When this data is received  it  is
  1216. placed in the variable specified by the INTO clause (if any).  An ACTION  is
  1217. triggered an control is passed to  the  highest  priority  specified  ACTION
  1218. routine (HOT_LINK,TOPIC,DDE_LINK).
  1219.  
  1220. The WARM_LINK  clause defines a 'warm' advise link for  the  item  named  by
  1221. itemname.  Whenever the data  associated  with  the  WARM_LINK  is  changed,
  1222. notification is sent to the client by the server, an  ACTION  is  triggered,
  1223. and control is passed to  the  highest  priority  specified  ACTION  routine
  1224. (WARM_LINK,TOPIC,DDE_LINK).
  1225.  
  1226.  
  1227.  
  1228.  
  1229.                   12.18 CREATE DDE_LINK Statement (Server)                  
  1230.  
  1231.  
  1232. Purpose:
  1233.  
  1234. Defines a link between a DDE Server  (AUTOPILOT)  and  a  DDE  Client  (some
  1235. other application, possibly AUTOPILOT).    Used  to  prepare  the  AUTOPILOT
  1236. script to act as a DDE server to one or more clients.
  1237.  
  1238. Format:
  1239.  
  1240.   ┌──────────────────────────────────────────────────────────────────────┐
  1241.   │ CREATE DDE_LINK linkid                                               │
  1242.   │   SERVER application                                                 │
  1243.   │   [ ACTION label ]                                                   │
  1244.   │   [ TOPIC clause-n ]                                                 │
  1245.   │ END_CREATE                                                           │
  1246.   │                                                                      │
  1247.   │ Topic clause for CREATE DDE_LINK:                                    │
  1248.   │                                                                      │
  1249.   │  TOPIC topicname [ ACTION label ] [ ENABLED|DISABLED ]               │
  1250.   │                             [ AS id ]                                │
  1251.   │   [ EXPORT_ITEM itemname [ FROM|INTO ] variable                      │
  1252.   │    [ ACTION label ] [ ENABLED|DISABLED ] [ AS id ] ] ...             │
  1253.   │   [ EXPORT_COMMAND command-str [ ACTION label ]                      │
  1254.   │    [ ENABLED|DISABLED ] [ AS id ] ] ...                              │
  1255.   └──────────────────────────────────────────────────────────────────────┘
  1256.  
  1257. Remarks:
  1258.  
  1259. This statement defines a DDE link between a server  (the  AUTOPILOT  script)
  1260. and a DDE client.   A definition merely defines the components of a link  --
  1261. it does not actually ready the script to participate in a conversation  (see
  1262. OPEN DDE_LINK).
  1263.  
  1264. The linkid argument may be either:
  1265.  
  1266.   o An integer expression between 1 and 30.
  1267.  
  1268.   o An identifier set to zero.  If this is the case, the identifier will  be
  1269.     set to an unused link id.
  1270.  
  1271. The SERVER clause indicates that this DDE_LINK is to act as  a  DDE  server.
  1272. The application argument specifies the name  of  the  application.    Client
  1273. programs will use this name when they try to establish a  conversation  with
  1274. the server.  It is required  and  may  occur  only  once  in  each  DDE_LINK
  1275. definition. The ACTION label clause allows you to specify a  label  in  your
  1276. AUTOPILOT program to receive control if one of the following events occur:
  1277.  
  1278.  o A DDE conversation is started by the client for a  TOPIC  that  does  not
  1279.    have an ACTION routine.
  1280.  
  1281.  o A conversation is ended by the client for a TOPIC that does not  have  an
  1282.    ACTION routine.
  1283.  
  1284.  o A REQUEST, POKE, START ADVISE, or STOP  ADVISE  transaction  is  received
  1285.    for an item defined in an  EXPORT_ITEM  clause  that  does  not  have  an
  1286.    ACTION routine
  1287.  
  1288.  o An  execute  transaction  is  received  for  a  command  defined  in  an
  1289.    EXPORT_COMMAND clause that does not have ACTION routine.
  1290.  
  1291. The TOPIC clause defines a desired topic for  a  DDE  conversation  and  any
  1292. EXPORT_ITEM and/or EXPORT_COMMAND entries  associated  with  that  topic.  A
  1293. DDE_LINK may have more than one TOPIC clause.
  1294.  
  1295. The EXPORT_ITEM clause defines an item that is available for poke,  request,
  1296. and  advise  transactions.    The  item  name  is  specified  as  a  string
  1297. expression.  It is required.  The item name is not case  sensitive  and  may
  1298. contain wildcard characters (see below).
  1299.  
  1300. If an EXPORT_ITEM is disabled, no  poke,  request,  or  advise  transactions
  1301. will be allowed.
  1302.  
  1303. When a poke, request, or advise transaction is received for an  EXPORT_ITEM,
  1304. an ACTION is triggered and control is passed to  the  routine  specified  in
  1305. the ACTION clause.
  1306.  
  1307. If no ACTION clause is specified  the  TOPIC's  (or,  if  none,  DDE_LINK's)
  1308. ACTION routine will  receive  control.  ACTION_OBJECT  (and  ACTION_INFO(1))
  1309. will return the DDE_LINK number. ACTION_ID (and ACTION_INFO(2)) will  return
  1310. the EXPORT_ITEM id.  ACTION_INFO(4) may be  used  to  determine  the  actual
  1311. item name specified by the client (this is useful if wildcards were used  in
  1312. the EXPORT_ITEM name). The transaction can be rejected by using a   non-zero
  1313. return code in the RESUME ACTION statement.
  1314.  
  1315. When a poke transaction is received for an item that matches an  EXPORT_ITEM
  1316. entry a Poke ACTION is triggered (ACTION_TYPE=17). The optional INTO  clause
  1317. specifies a variable that will receive the data . In addition, the data  can
  1318. be retrieved in the  ACTION routine via ACTION_INFO(5).
  1319.  
  1320. When a Request transaction  is  received,  a  Request  ACTION  is  triggered
  1321. (ACTION_TYPE=18). The data returned to  client  is  specified  by  the  last
  1322. DDE_UPDATE statement issued  for  this  item  prior  to  the  RESUME  ACTION
  1323. statement.  If there is no ACTION routine, the value of the last  DDE_UPDATE
  1324. will be returned immediately.
  1325.  
  1326. When a  Start  Advise  transaction  is  received,  an  ACTION  is  triggered
  1327. (ACTION_TYPE=15).  If  the  advise  link  is  accepted  (default,  unless  a
  1328. non-zero return code is specified in  the  RESUME  ACTION  statement),  data
  1329. will be sent to the client whenever the export  item  is  updated  with  the
  1330. DDE_UPDATE statement.
  1331.  
  1332. When  a  Stop  Advise  transaction  is  received,  an  ACTION  is  triggered
  1333. (ACTION_TYPE=16). Data will no longer be sent to the client when  the  value
  1334. of the EXPORT_ITEM is changed via the DDE_UPDATE statement.
  1335.  
  1336. The EXPORT_COMMAND clause defines a command that  is  available  for  client
  1337. execute transactions.  The command is specified as a string expression.   It
  1338. is required.  The command is not case sensitive  and  may  contain  wildcard
  1339. characters (see below).
  1340.  
  1341. If an EXPORT_COMMAND is disabled, execute ACTIONs will be triggered.
  1342.  
  1343. When an execute transaction is received for an EXPORT_COMMAND, an ACTION  is
  1344. triggered and control is passed to  the  routine  specified  in  the  ACTION
  1345. clause.  If no ACTION clause is specified, the TOPIC's  (or,  if  none,  the
  1346. DDE_LINK's)    ACTION  routine  will  receive  control.  ACTION_OBJECT  (and
  1347. ACTION_INFO(1))  will  return  the  DDE_LINK  number.  ACTION_ID  (and
  1348. ACTION_INFO(2)) will return the EXPORT_COMMAND  id.  ACTION_INFO(5)  may  be
  1349. used to determine the actual command issued by the client  (this  is  useful
  1350. if wildcards were used  in  the  EXPORT_COMMAND).  The  transaction  can  be
  1351. rejected by using a  non-zero return code in the RESUME ACTION statement.
  1352.  
  1353. As previously stated,  a  wildcard  pattern  may  used  in  EXPORT_ITEM  and
  1354. EXPORT_COMMAND names. This is useful in instances where there  are  a  large
  1355. number of possible items and commands that the server would like  to  accept
  1356. but would rather not define an explicit entry for  each  one.  The  wildcard
  1357. pattern characters used are the same as can be specified in AUTOPILOTs  WAIT
  1358. statement:
  1359.  
  1360.   ?  - matches any character
  1361.   s* - matches zero or more occurrences of character 's'
  1362.   s+ - matches one or more occurrences of character 's'
  1363.   \? - used to match a '?'
  1364.   \* - used to match a '*'
  1365.   \+ - used to match a '+'
  1366.  
  1367. For example, if a script maintained a table of say, 100 rows and 20  columns
  1368. and wanted to allow DDE clients to establish links  with  various  cells  in
  1369. that table it could specify an EXPORT_ITEM entry for each of the 2000  items
  1370. in the table.  A better way would be to specify a  single  EXPORT_ITEM  with
  1371. an item name containing wildcards:
  1372.  
  1373.   EXPORT_ITEM "ROW?+ COL?+" ACTION myactrtn AS 100
  1374.  
  1375. The item name "R?+C?+" would match any client request with a name  that  had
  1376. 'ROW ', followed by 1 or more characters, followed by  'COL  '  followed  by
  1377. one or more characters.
  1378.  
  1379. For example, "ROW 1 COL 2" and  "Row 25 Col 100"  are valid and "10  Col  5"
  1380. and "Row 5 Col" are not.  In our  example,  the  ACTION  routine  'myactrtn'
  1381. could use ACTION_INFO(4) to retrieve the item name issued by the  client  an
  1382. extract the row and column number (Since "Row xyz Col #$@" would also  match
  1383. the wildcard item name, the server script needs to  do  some  validation--it
  1384. can use a non-zero return code on the RESUME ACTION statement  to  reject  a
  1385. transaction).
  1386.  
  1387. When using wildcard matches for items that need to respond  to  Request  and
  1388. Advise transactions, the script should add an explicit EXPORT_ITEM (via  the
  1389. ADD statement) for the actual item name specified by  the  client  (you  can
  1390. use ACTION_INFO(4) to get the actual item name.   Once  the  EXPORT_ITEM  is
  1391. added, you can use DDE_UPDATE to update the value of  the  EXPORT_ITEM.  The
  1392. following code fragment show how an ACTION routine might add an  EXPORT_ITEM
  1393. (if it wasn't already added) and then update the item's value.
  1394.  
  1395.   IF ACTION_TYPE = 18
  1396.     BEGIN
  1397.       IF TEXT_OF(EXPORT_ITEM(id))= ""
  1398.         BEGIN
  1399.             ADD TO TOPIC(1)
  1400.             EXPORT_ITEM ACTION_INFO(4) 
  1401.             ACTION link_wildcard AS id
  1402.         END
  1403.       DDE_UPDATE EXPORT_ITEM(id) WITH item(id)
  1404.     END
  1405.  
  1406.  
  1407.  
  1408.  
  1409.                     12.19 CREATE DIALOG_WINDOW Statement                    
  1410.  
  1411.  
  1412. Purpose:
  1413.  
  1414. This statement will define a Presentation  Manager  dialog  to  contain  any
  1415. number of a variety of dialog controls.    Used  in  conjunction  with  OPEN
  1416. DIALOG_WINDOW,  CLOSE  DIALOG_WINDOW  and  DESTROY  DIALOG_WINDOW  to  allow
  1417. AUTOPILOT programs to define and manipulate there own  Presentation  Manager
  1418. dialogs.
  1419.  
  1420. Format:
  1421.  
  1422.   ┌──────────────────────────────────────────────────────────────────────┐
  1423.   │ CREATE DIALOG_WINDOW <winid>                                         │
  1424.   │   [ VISIBLE | INVISIBLE ]                                            │
  1425.   │   [ ENABLED | DISABLED ]                                             │
  1426.   │   [ MINIMIZED | MAXIMIZED ]                                          │
  1427.   │   [ TITLE_BAR <title-string> ]                                       │
  1428.   │   [ BORDER TYPE <border-type> ]                                      │
  1429.   │   [ ICON <iconfilespec> ]                                            │
  1430.   │   [ TASK_LIST ]                                                      │
  1431.   │   [ SYSTEM_MENU ]                                                    │
  1432.   │   [ MAXIMIZE_BUTTON ]                                                │
  1433.   │   [ MINIMIZE_BUTTON ]                                                │
  1434.   │   [ WINDOW_SIZE < rows> [ { TEXT_ROWS  } ]                           │
  1435.   │                         [ { DEVICE_ROWS } ]                          │
  1436.   │                         [ { DIALOG_ROWS } ] ] [,]                    │
  1437.   │                  <cols> [ { TEXT_COLUMNS   } ]                       │
  1438.   │                         [ { DEVICE_COLUMNS } ]                       │
  1439.   │                         [ { DIALOG_COLUMNS } ] ]                     │
  1440.   │   [WINDOW_POSITION [ DEVICE_ROWS ]   <rows>[,]                       │
  1441.   │                    [ DEVICE_COLUMNS ] <cols>]                        │
  1442.   │   [ ACTION <label>  ]                                                │
  1443.   │   [ ACTION_BAR_MENU  clause ]                                        │
  1444.   │   [ TEXT_FIELD clause ]                                              │
  1445.   │   [ ENTRY_FIELD clause ]                                             │
  1446.   │   [ MULTILINE_ENTRY_FIELD clause ]                                   │
  1447.   │   [ PUSH_BUTTON clause ]                                             │
  1448.   │   [ RADIO_BUTTON clause ]                                            │
  1449.   │   [ CHECK_BOX clause ]                                               │
  1450.   │   [ LIST_BOX clause ]                                                │
  1451.   │   [ COMBINATION_BOX clause ]                                         │
  1452.   │   [ GROUP_BOX clause ]                                               │
  1453.   │   [ ICON_FIELD clause ]                                              │
  1454.   │ END_CREATE                                                           │
  1455.   └──────────────────────────────────────────────────────────────────────┘
  1456.  
  1457.  
  1458. Remarks:
  1459.  
  1460. CREATE DIALOG_WINDOW  is  used  to  create  standard  OS/2  dialog  windows.
  1461. Multiple CREATE DIALOG_WINDOW Statements can be used in a  single  AUTOPILOT
  1462. program.  To indicate which dialog is current, use  the  SET  CURRENT_WINDOW
  1463. Statement.
  1464.  
  1465. <winid>
  1466.     may be either:
  1467.  
  1468.   1. An integer expression such that 0 < <winid> < 100.
  1469.  
  1470.   2. An identifier set to zero. If this is the case, the identifier will  be
  1471.      set to the window id assigned to this dialog. This is  the  recommended
  1472.      approach.
  1473.  
  1474. The initial visibility state of a dialog  may  be  set  by  the  VISIBLE  or
  1475. INVISIBLE keyword. The default is  VISIBLE.  The  visibility  state  may  be
  1476. changed after dialog creation by using the SHOW DIALOG_WINDOW Statement.
  1477.  
  1478. The initial selectability state of the  DIALOG_WINDOW  may  be  set  by  the
  1479. ENABLED or DISABLED keyword.  The  default  is  ENABLED.  The  selectability
  1480. state  may  be  changed  after  dialog  creation  by  using  the  ENABLE
  1481. DIALOG_WINDOW or DISABLE DIALOG_WINDOW Statements.  If  a  DIALOG_WINDOW  is
  1482. DISABLED, it will not receive focus.
  1483.  
  1484. MINIMIZED/MAXIMIZED
  1485.  The initial size state of the  window  may  be  set  by  the  MINIMIZED  or
  1486.  MAXIMIZED clause.  The default is  neither  --  the  initial  size  of  the
  1487.  window is set  by  the  WINDOW_SIZE  clause.    The  MINIMIZE  or  MAXIMIZE
  1488.  Statement can be used after dialog creation to change this state.
  1489.  
  1490. TITLE_BAR
  1491.  Adds a title bar to the dialog. <title-string> is required but may  be  set
  1492.  to "".  If this clause is not included, no title bar will be included.
  1493.  
  1494. BORDER
  1495.  Determines the type of border the dialog will have. <bordertype> may be:
  1496.  
  1497.   0 - no border
  1498.   1 - size border
  1499.   2 - dialog border
  1500.   3 - standard border
  1501.  
  1502.  If this clause is not included, the window will have no border.
  1503.  
  1504. ICON
  1505.  Sets the dialog's  icon  to  the  icon  specified  by  <iconfilespec>.  The
  1506.  default directory for the icon is set by the  ICON_DIRECTORY  Customization
  1507.  Variable (this variable can be viewed or changed by  selecting  the  System
  1508.  Configuration dialog on the Utilities pull down menu on  any  Phone  Book).
  1509.  If this clause is not specified, the  icon  will  be  set  to  one  of  the
  1510.  standard OS/2 icons by the dialog procedure.
  1511.  
  1512. TASK_LIST
  1513.  A dialog may put itself on the  OS/2  Task  List  by  using  the  TASK_LIST
  1514.  clause.  By default, the window WILL NOT be put on the Task List.
  1515.  
  1516. SYSTEM_MENU
  1517. MINIMIZE_BUTTON
  1518. MAXIMIZE_BUTTON
  1519.  Includes the specified component in the  dialog.  If  the  keyword  is  not
  1520.  specified the component is not included.
  1521.  
  1522. WINDOW_SIZE
  1523.  Defines  the dialog size
  1524.  
  1525.  The default coordinate type  is  DIALOG_ROWS  and  DIALOG_COLUMNS.    Valid
  1526.  coordinate types are TEXT_ROWS, TEXT_COLUMNS, DIALOG_ROWS,  DIALOG_COLUMNS,
  1527.  DEVICE_ROWS, and DEVICE_COLUMNS (see Coordinate System discussed below).
  1528.  
  1529. WINDOW_POSITION
  1530.  Defines  the dialog position relative to its parent.
  1531.  
  1532.  The  default  and  only  valid  coordinate  types  are  DEVICE_ROW[S]  and
  1533.  DEVICE_COLUMN[S] (see Coordinate System discussed below).
  1534.  
  1535. ACTION
  1536.  Allows you to specify a label in your AUTOPILOT program to receive  control
  1537.  if one of the following conditions are true:
  1538.  
  1539.   1. The SYSTEM MENU Item Close is requested.
  1540.   2. A PULLDOWN is requested (see ACTION_BAR_MENU below) with no  associated
  1541.      ACTION.
  1542.   3. A CHOICE is requested (see ACTION_BAR_MENU below)  with  no  associated
  1543.      ACTION and no associated PULLDOWN ACTION.
  1544.   4. A dialog control is activated and no ACTION clause was specified.
  1545.  
  1546.  See the discussion under the ACTION_BAR_MENU clause  for  more  information
  1547.  on PULLDOWN and CHOICE ACTIONs.
  1548.  
  1549. A discussion on the ACTION_BAR_MENU clause and all  dialog  control  clauses
  1550. are discussed after the Coordinate System.
  1551.  
  1552.  
  1553. Coordinate System:
  1554.  
  1555. The following system is used to  determine  coordinates  on  the  TEXT_SIZE,
  1556. WINDOW_SIZE and WINDOW_POSITION clauses.
  1557.  
  1558. The Coordinate System is based on a grid where Y  is the Vertical  Axis  and  X  is  the
  1559. Horizontal Axis.
  1560.  
  1561.   1. The origin (0,0) is the top left corner.
  1562.  
  1563.   2. By default, Y is specified first.
  1564.  
  1565.   3. The values may be separated by a comma:
  1566.  
  1567.       AT 20 , 5
  1568.  
  1569.   4. There are several different units that a coordinate  specification  may
  1570.      be expressed in:
  1571.  
  1572.    DEVICE  - essentially Pels
  1573.    TEXT    - text character position
  1574.    DIALOG  - related to the size of the window or dialog's character set
  1575.  
  1576.    The following keywords are used in size specifications:
  1577.    
  1578.      DEVICE_ROWS   DEVICE_COLUMNS
  1579.      TEXT_ROWS     TEXT_COLUMNS
  1580.      DIALOG_ROWS   DIALOG_COLUMNS
  1581.  
  1582.    The following keywords are used in position specifications:
  1583.    
  1584.      DEVICE_ROW    DEVICE_COLUMN
  1585.      TEXT_ROW      TEXT_COLUMN
  1586.      DIALOG_ROW    DIALOG_COLUMN
  1587.  
  1588. ┌────────────────────────────────┐
  1589. │ 12.19.1 ACTION_BAR_MENU Clause │
  1590. └────────────────────────────────┘
  1591.  
  1592.   Purpose:
  1593.  
  1594.   The ACTION_BAR_MENU clause allows you to create action bar  menus  and  to
  1595.   define the ACTIONs to occur when they are selected.  It can  be  specified
  1596.   in a CREATE DIALOG_WINDOW, CREATE TEXT_WINDOW, ADD  TO  DIALOG_WINDOW,  or
  1597.   ADD TO TEXT_WINDOW Statement.
  1598.  
  1599.   Format:
  1600.  
  1601.   ┌──────────────────────────────────────────────────────────────────────┐
  1602.   │ ACTION_BAR_MENU [ [ ACTION ] <label> ]                               │
  1603.   │                 [ ENABED|DISABLED ]                                  │
  1604.   │   PULLDOWN <text> [ [ ACTION ] <label> ] ]                           │
  1605.   │                   [ ENABLED|DISABLED ] [AS <refno>]                  │
  1606.   │     CHOICE <text> [ [ ACTION ] <label> ] ]                           │
  1607.   │                   [ ENABLED|DISABLED ]                               │
  1608.   │                   [ CHECKED|UNCHECKED ] [AS <refno > ]               │
  1609.   │     SEPARATOR [ AS <refno> ]                                         │
  1610.   │                                                                      │
  1611.   │   PULLDOWN <text> [ [ ACTION ] <label> ] ]                           │
  1612.   │                   [ ENABLED|DISABLED ] [AS <refno> ]                 │
  1613.   │     CHOICE <text> [ [ ACTION ] <label> ] ]                           │
  1614.   │                   [ ENABLED|DISABLED ]                               │
  1615.   │                   [ CHECKED|UNCHECKED ] [AS <refno> ]                │
  1616.   │     SEPARATOR [ AS <refno> ]                                         │
  1617.   └──────────────────────────────────────────────────────────────────────┘
  1618.  
  1619.   Remarks:
  1620.  
  1621.   Action bar menus consist of 1 or more PULLDOWN menus.  Each PULLDOWN  menu
  1622.   consists of all the CHOICEs and SEPARATORs that follow it until  the  next
  1623.   PULLDOWN Statement is encountered or the ACTION_BAR_MENU clause ends.    A
  1624.   PULLDOWN without any subsequent CHOICEs or SEPARATORs will not  display  a
  1625.   menu when selected but will instead act as if it was a CHOICE item.
  1626.  
  1627.   The <text> of a PULLDOWN will appear  on the action bar menu.  If a  tilde
  1628.   (~) appears in the text, the character  following the tilde  will  form  a
  1629.   mnemonic in association with the ALT Key  that can be used to display  the
  1630.   PULLDOWN directly from the keyboard (called an Accelerator):
  1631.  
  1632.               PULLDOWN "~File" AS 100
  1633.  
  1634.    In the preceding example, pressing ALT/F will display the File pull  down
  1635.    menu.
  1636.  
  1637.    The <text> on the CHOICE clause appears on the associated  PULLDOWN menu.
  1638.    If a tilde (~) appears in the text, it will establish an Accelerator  Key
  1639.    exactly as with the PULLDOWN. Embedding a Tab (tilde followed by  capital
  1640.    i - ~I) in the <text> will cause the text to the right of the tab  to  be
  1641.    displayed on the right side of the CHOICE.
  1642.  
  1643.    A PULLDOWN or CHOICE may be ENABLE'd or DISABLE'd.   If  DISABLE'd,  they
  1644.    will appear "grayed out" and may not be selected. By  default,  they  are
  1645.    ENABLE'd.  If a PULLDOWN is  DISABLE'd,  all  CHOICES  are,  by  default,
  1646.    DISABLE'd.
  1647.  
  1648.    If a CHOICE is CHECKED, a small check mark will appear  next  to  <text>.
  1649.    The  default  is  UNCHECKED.    CHOICES  may  be  CHECKED  and  UNCHECKED
  1650.    dynamically by using the CHECK and UNCHECK Statements.
  1651.  
  1652.    The AS <refno> clause is optional and allows you to  assign  a  Reference
  1653.    Number to an  ACTION_BAR_ITEM,  PULLDOWN,  or  CHOICE.    This  Reference
  1654.    Number can be referred to in other Statements (i.e.  ENABLE/DISABLE,  SET
  1655.    PULL_DOWN, SET CHOICE).  Valid reference numbers are in the  range  of  1
  1656.    to 10000.
  1657.  
  1658.    The ACTION clause allows you to specify the  <label>  in  this  AUTOPILOT
  1659.    program to receive control when this PULLDOWN or CHOICE is selected.   If
  1660.    ACTION is specified on the PULLDOWN clause, it will only be triggered  if
  1661.    there are NO associated CHOICEs.
  1662.  
  1663.    The ACTION associated with  the  ACTION_BAR_MENU  only  receives  control
  1664.    when a CHOICE is selected that contains NO ACTION or when a  PULLDOWN  is
  1665.    selected which has no CHOICEs or ACTIONs.
  1666.  
  1667.    When routines identified by an ACTION clause receive control, the  entire
  1668.    action bar menu is DISABLE'd  (grayed  out)  until  a  RESUME  ACTION  or
  1669.    ENABLE ACTION_BAR_MENU Statement is issued. Since you  probably  wish  to
  1670.    complete a selected item prior to allowing more action bar menu items  to
  1671.    be selected, it is normally  recommended  that  you  do  not  ENABLE  the
  1672.    action bar menu until you wish to RESUME  normal  processing.    See  the
  1673.    RESUME and ENABLE Statements for more information on format.
  1674.  
  1675.    Multiple ACTION clauses may indicate the same <label>  in  the  AUTOPILOT
  1676.    program.  If a common routine wishes to identify which  CHOICE  triggered
  1677.    it, it may use the ACTION_WINDOW, ACTION_TYPE  and  ACTION_ID  Functions.
  1678.    See the discussion of these Functions for more information.
  1679.  
  1680.    A SEPARATOR is simply a horizontal line  that  is  used  to  break  up  a
  1681.    PULLDOWN menu.  It cannot be selected, ENABLE'd, DISABLE'd,  CHECKED,  or
  1682.    UNCHECKED.
  1683.  
  1684. ┌──────────────────────────┐
  1685. │ 12.19.2 CHECK_BOX Clause │
  1686. └──────────────────────────┘
  1687.  
  1688.   Purpose:
  1689.  
  1690.   A CHECK_BOX is a small square with associated text to  the  right.  It  is
  1691.   used to select zero or more items from a list. When the box or  string  is
  1692.   clicked, by clicking on it with the mouse or pressing  the  spacebar  when
  1693.   it is active, the check box changes state from  CHECKed  to  UNCHECKed  or
  1694.   from UNCHECKed to CHECKed.
  1695.  
  1696.   Format:
  1697.  
  1698.   ┌──────────────────────────────────────────────────────────────────────┐
  1699.   │ CHECK_BOX <text>                                                     │
  1700.   │      [ VISIBLE | INVISIBLE ]                                         │
  1701.   │      [ ENABLED | DISABLED ]                                          │
  1702.   │      [ CHECKED | UNCHECKED ]                                         │
  1703.   │      [ SIZE <rowsize> , <colsize> ]                                  │
  1704.   │      [ AT <rowpos> , <colpos> ]                                      │
  1705.   │      [ ACTION  <label> ]                                             │
  1706.   │      [ AS <refno> ]                                                  │
  1707.   └──────────────────────────────────────────────────────────────────────┘
  1708.  
  1709.   Remarks:
  1710.  
  1711.   <text> sets the initial text of the  CHECK_BOX. It is required. It may  be
  1712.   changed after dialog create by using the SET CHECK_BOX Statement.
  1713.  
  1714.   The initial visibility state of may be set by  the  VISIBLE  or  INVISIBLE
  1715.   keyword. The default is VISIBLE.  The  visibility  state  may  be  changed
  1716.   after dialog creation by  using  the  SHOW  CHECK_BOX  or  HIDE  CHECK_BOX
  1717.   Statements.
  1718.  
  1719.   The initial selectability state  of  the  CHECK_BOX  may  be  set  by  the
  1720.   ENABLED or DISABLED keyword. The default  is  ENABLED.  The  selectability
  1721.   state may be changed after dialog creation by using the  ENABLE  CHECK_BOX
  1722.   or DISABLE  CHECK_BOX  Statements.  If  a  CHECK_BOX  is  DISABLED  it  is
  1723.   displayed in halftone and cannot be clicked.
  1724.  
  1725.   The initial checked state may be set by using  the  CHECKED  or  UNCHECKED
  1726.   keywords. The default is UNCHECKED.  The  checked  state  may  be  changed
  1727.   after dialog creation by using the CHECK CHECK_BOX  or  UNCHECK  CHECK_BOX
  1728.   Statements. The current check state may be determined  by  the  IS_CHECKED
  1729.   Function.
  1730.  
  1731.   The size of the CHECK_BOX is defined  in  the  SIZE  clause.  The  default
  1732.   units are DIALOG_ROWS and DIALOG_COLUMNS. If no SIZE clause  is  specified
  1733.   the SIZE will default to the minimum size to display <text>. The  standard
  1734.   height for a CHECK_BOX is 10 DIALOG_ROWS. The width is  dependant  on  the
  1735.   contents of <text>.
  1736.  
  1737.   The position of the CHECK_BOX is defined in the  AT  clause.  The  default
  1738.   units are DIALOG_ROWS and DIALOG_COLUMNS. The position is relative to  the
  1739.   top left corner of the DIALOG_WINDOW and specifies the top left corner  of
  1740.   the CHECK_BOX.
  1741.  
  1742.   The ACTION clause allows you  to  specify  a  <label>  that  will  receive
  1743.   control after a CHECK_BOX has been pressed. If the  action  is  triggered,
  1744.   ACTION_WINDOW will be set to the window number  specified  in  the  CREATE
  1745.   DIALOG_WINDOW  Statement,  ACTION_ID  will  be  set  to  the  CHECK  BOX's
  1746.   reference number (see AS clause) and ACTION_TYPE will be set to 5.
  1747.  
  1748.   The AS clause allows a specific reference number to  be  assigned  to  the
  1749.   CHECK_BOX. If not specified, the reference number 1  is  assigned  to  the
  1750.   first CHECK_BOX on the screen that doesn't have an AS clause,  the  number
  1751.   2 is assigned to the second, 3 to the third and so on. If the contents  of
  1752.   the AS clause is an  identifier  that  has  a  numeric  value  of  0,  the
  1753.   identifier will be set to the assigned reference number.
  1754.  
  1755.   The <text> associated  with  a  CHECK_BOX  may  be  determined  using  the
  1756.   TEXT_OF  Function.
  1757.  
  1758. ┌────────────────────────────────┐
  1759. │ 12.19.3 COMBINATION_BOX Clause │
  1760. └────────────────────────────────┘
  1761.  
  1762.   Purpose:
  1763.  
  1764.   A COMBINATION_BOX combines the capabilities of both an ENTRY_FIELD  and  a
  1765.   LIST_BOX.
  1766.  
  1767.   Format:
  1768.  
  1769.   ┌──────────────────────────────────────────────────────────────────────┐
  1770.   │ COMBINATION_BOX  [<text>]                                            │
  1771.   │      [ VISIBLE | INVISIBLE ]                                         │
  1772.   │      [ ENABLED | DISABLED ]                                          │
  1773.   │      [ DROP_DOWN | DROP_DOWN_LIST ]                                  │
  1774.   │      [ LINES ... , ... ]                                             │
  1775.   │      [ USING <sortstr> ]                                             │
  1776.   │      [ SIZE <rowsize> , <colsize> ]                                  │
  1777.   │      [ ACTION <label> ]                                              │
  1778.   │      [ AT <rowpos> , <colpos> ]                                      │
  1779.   │      [ AS  <refno> ]                                                 │
  1780.   └──────────────────────────────────────────────────────────────────────┘
  1781.  
  1782.   Remarks:
  1783.  
  1784.   The optional <text> clause may be used to specify the initial text of  the
  1785.   entry field portion of the COMBINATION_BOX. If not specified  it  defaults
  1786.   to the SELECTED item.
  1787.  
  1788.   The initial visibility state of  a  COMBINATION_BOX  may  be  set  by  the
  1789.   VISIBLE or INVISIBLE keyword.  The  default  is  VISIBLE.  The  visibility
  1790.   state  may  be  changed  after  dialog  creation  by  using  the  SHOW
  1791.   COMBINATION_BOX or HIDE COMBINATION_BOX Statements.
  1792.  
  1793.   The initial selectability state of the COMBINATION_BOX may be set  by  the
  1794.   ENABLED or DISABLED keyword. The default  is  ENABLED.  The  selectability
  1795.   state  may  be  changed  after  dialog  creation  by  using  the  ENABLE
  1796.   COMBINATION_BOX  or  DISABLE  COMBINATION_BOX  Statements.  If  a
  1797.   COMBINATION_BOX is DISABLED the selection cannot be changed.
  1798.  
  1799.   The default COMBINATION_BOX style shows a list box/entry field  pair  such
  1800.   that both are always visible. The DROP_DOWN style works like  the  default
  1801.   style except that the list box portion is hidden until the user clicks  on
  1802.   the prompt box to  display  it.  It  can  be  selected  by  including  the
  1803.   DROP_DOWN  keyword.  The  DROP_DOWN_LIST  style  is  a  variation  on  the
  1804.   DROP_DOWN style where the entry field can only have  selections  that  are
  1805.   specified in the list box.
  1806.  
  1807.   The initial contents of the list box portion is set by the optional  LINES
  1808.   (or LINE) clause. The LINES clause consists of 1 or more  comma  separated
  1809.   string expressions and or array ranges:
  1810.  
  1811.   ┌──────────────────────────────────────────────────────────────────────┐
  1812.   │ LINES  {string [ SELECTED ]         }  [, ...]                       │
  1813.   │        {array [ FROM dim1 [ ,dim2 ] ...]                             │
  1814.   │             [ TO   dim1 [,dim2 ] ...]    }                           │
  1815.   └──────────────────────────────────────────────────────────────────────┘
  1816.  
  1817.   The  keyword  SELECTED  may  be  associated  with  a  particular  string
  1818.   specification to select that line. The SELECT and DESELECT Statements  may
  1819.   be used after dialog creation to change the selection.  The  SELECTED_LINE
  1820.   Function may be used to determine which line is selected.
  1821.  
  1822.   The USING clause uses a subset of the SORT USING options. This allows  you
  1823.   to explicitly specify the order items will  be  placed  in  the  list  box
  1824.   portion  of  the  COMBINATION_BOX.  The  valid  options  are  'T1'  (ASCII
  1825.   collating sequence),'T2' (dictionary order i.e.  case  insensitive),  'T3'
  1826.   (numeric), 'A' (ascending), and 'D' (descending). See the  SORT  Statement
  1827.   for more details.
  1828.  
  1829.   The size of the  COMBINATION_BOX  is  defined  in  the  SIZE  clause.  The
  1830.   default units are DIALOG_ROWS and DIALOG_COLUMNS.
  1831.  
  1832.   The ACTION clause allows you  to  specify  a  <label>  that  will  receive
  1833.   control  after  an  element  has  been  selected  or  deselected  in  the
  1834.   COMBINATION  BOX    has  been  pressed.  If  the  action  is  triggered,
  1835.   ACTION_WINDOW will be set to the window number  specified  in  the  CREATE
  1836.   DIALOG_WINDOW Statement, ACTION_ID will be set to  the  COMBINATION  BOX's
  1837.   reference number (see AS clause) and ACTION_TYPE will be set to  7.    The
  1838.   ACTION will also be triggered if the  MOUSE  is  Double  Clicked  over  an
  1839.   item.  In this case, ACTION_TYPE will be set to 8.
  1840.  
  1841.   The position of the COMBINATION_BOX is  defined  in  the  AT  clause.  The
  1842.   default  units  are  DIALOG_ROWS  and  DIALOG_COLUMNS.  The  position  is
  1843.   relative to the top left corner of the DIALOG_WINDOW  and  refers  to  the
  1844.   top left of the COMBINATION_BOX.
  1845.  
  1846.   The AS clause allows a specific reference number to  be  assigned  to  the
  1847.   COMBINATION_BOX. If not specified, the reference number 1 is  assigned  to
  1848.   the first COMBINATION_BOX on the screen that doesn't have  an  AS  clause,
  1849.   the number 2 is assigned to the second, 3 to the third and so on.  If  the
  1850.   contents of the AS clause is an identifier that has a numeric value of  0,
  1851.   the identifier will be set to the assigned reference number.
  1852.  
  1853.   The contents of  the  COMBINATION_BOX  may  be  determined  by  using  the
  1854.   TEXT_OF Function.
  1855.  
  1856. ┌────────────────────────────┐
  1857. │ 12.19.4 ENTRY_FIELD Clause │
  1858. └────────────────────────────┘
  1859.  
  1860.   Purpose:
  1861.  
  1862.   An ENTRY_FIELD is a rectangular area of the dialog that displays a  single
  1863.   line of text that the user can edit.
  1864.  
  1865.   Format:
  1866.  
  1867.   ┌──────────────────────────────────────────────────────────────────────┐
  1868.   │ ENTRY_FIELD  <text>                                                  │
  1869.   │     [ VISIBLE | INVISIBLE ]                                          │
  1870.   │     [ ENABLED | DISABLED ]                                           │
  1871.   │     [ TEXT_SIZE  < maxchars> ]                                       │
  1872.   │     [ ALIGN_LEFT | ALIGN_CENTER | ALIGN_RIGHT ]                      │
  1873.   │     [ AUTOSKIP ]                                                     │
  1874.   │     [ NOECHO ]                                                       │
  1875.   │     [ READ_ONLY ]                                                    │
  1876.   │     [ BORDER 0 | 1 ]                                                 │
  1877.   │     [ SIZE <rowsize> , <colsize> ]                                   │
  1878.   │     [ AT <rowpos> , <colpos> ]                                       │
  1879.   │     [ ACTION <label  ]                                               │
  1880.   │     [ AS <refno> ]                                                   │
  1881.   └──────────────────────────────────────────────────────────────────────┘
  1882.  
  1883.   Remarks:
  1884.  
  1885.   The initial value of a field is set by <text>. This field is required  but
  1886.   may be set to "" or " ".
  1887.  
  1888.   The maximum number of characters that may be entered into  an  ENTRY_FIELD
  1889.   is determined by the TEXT_SIZE clause. By default, TEXT_SIZE is 32.
  1890.  
  1891.   The entered text can be automatically aligned  and  justified  within  the
  1892.   ENTRY_FIELD by specifying ALIGN_LEFT, ALIGN_CENTER, or ALIGN_RIGHT.    The
  1893.   default is ALIGN_LEFT.
  1894.  
  1895.   The initial visibility state of the text may be  set  by  the  VISIBLE  or
  1896.   INVISIBLE keyword. The default is VISIBLE. The  visibility  state  may  be
  1897.   changed after dialog creation  by  using  the  SHOW  ENTRY_FIELD  or  HIDE
  1898.   ENTRY_FIELD Statements.
  1899.  
  1900.   The initial selectability state of the  ENTRY_FIELD  may  be  set  by  the
  1901.   ENABLED or DISABLED keyword. The default  is  ENABLED.  The  selectability
  1902.   state  may  be  changed  after  dialog  creation  by  using  the  ENABLE
  1903.   ENTRY_FIELD or  DISABLE  ENTRY_FIELD  Statements.  If  an  ENTRY_FIELD  is
  1904.   DISABLED it cannot be modified by the user or accessed from  the  keyboard
  1905.   or by the mouse.
  1906.  
  1907.   If AUTOSKIP is specified, keyboard focus  will  automatically  go  to  the
  1908.   next field in the dialog after TEXT_SIZE  characters  have  been  entered.
  1909.   The default is NO AUTOSKIP.
  1910.  
  1911.   If the READ_ONLY keyword is specified, the ENTRY_FIELD cannot be  modified
  1912.   by the user.
  1913.  
  1914.   If NOECHO is specified, characters will be displayed as asterisk  This  is
  1915.   commonly used for password fields.
  1916.  
  1917.   The BORDER clause defines the type of border  that  is  drawn  around  the
  1918.   ENTRY_FIELD. 0 specifies no border and 1 specifies  a  thin  line  border.
  1919.   The default is BORDER 1.
  1920.  
  1921.   The size of the ENTRY_FIELD is defined in the  SIZE  clause.  The  default
  1922.   units are DIALOG_ROWS and DIALOG_COLUMNS. If no SIZE clause  is  specified
  1923.   the SIZE will default to the size needed to display <text> plus  room  for
  1924.   about 4 more characters. The standard height  for  an  entry  field  is  8
  1925.   DIALOG_ROWS. If the field is not large enough to display the entered  text
  1926.   (up to TEXT_SIZE characters) the field will automatically  scroll.    Note
  1927.   that the SIZE specification does not include  the  border  i.e.  a  border
  1928.   will be drawn around the field whose height and width is defined by SIZE.
  1929.  
  1930.   The position of the ENTRY_FIELD is defined in the AT clause.  The  default
  1931.   units are DIALOG_ROWS and DIALOG_COLUMNS. The position is relative to  the
  1932.   top left corner of the DIALOG_WINDOW. The  position  refers  to  top  left
  1933.   corner of the field's text, not its border. For example,  an  entry  field
  1934.   with a border would be aligned with a text field on the same row.
  1935.  
  1936.   The ACTION clause allows you  to  specify  a  <label>  that  will  receive
  1937.   control after a field has been modified and the keyboard focus  has  moved
  1938.   to another field. If the action is triggered, ACTION_WINDOW  will  be  set
  1939.   to the <winid> specified in the CREATE DIALOG_WINDOW Statement,  ACTION_ID
  1940.   will be set to the ENTRY_FIELD's reference  number  (see  AS  clause)  and
  1941.   ACTION_TYPE will be set to 6 (field changed).
  1942.  
  1943.   The AS clause allows a specific reference number to  be  assigned  to  the
  1944.   ENTRY_FIELD. If not specified, the reference number 1 is assigned  to  the
  1945.   first ENTRY_FIELD on the screen  that  doesn't  have  an  AS  clause,  the
  1946.   number 2 is assigned to the second, 3 to the  third  and  so  on.  If  the
  1947.   contents of the AS clause is an identifier that has a numeric value of  0,
  1948.   the identifier will be set to the assigned reference number.
  1949.  
  1950.   The contents of  an  ENTRY_FIELD  may  be  determined  using  the  TEXT_OF
  1951.   Function.
  1952.  
  1953. ┌──────────────────────────┐
  1954. │ 12.19.5 GROUP_BOX Clause │
  1955. └──────────────────────────┘
  1956.  
  1957.   Purpose:
  1958.  
  1959.   A GROUP_BOX is a box that has an identifying  text  string  in  its  upper
  1960.   left corner. GROUP_BOXES are used to collect a group of  RADIO_BUTTONS  or
  1961.   other dialog controls visually into a single unit.
  1962.  
  1963.   Format:
  1964.  
  1965.   ┌──────────────────────────────────────────────────────────────────────┐
  1966.   │ GROUP_BOX <text>                                                     │
  1967.   │      [ VISIBLE | INVISIBLE ]                                         │
  1968.   │      [ SIZE <rowsize> , <colsize> ]                                  │
  1969.   │      [ AT <rowpos> , <colpos> ]                                      │
  1970.   │      [ AS <refno>  ]                                                 │
  1971.   └──────────────────────────────────────────────────────────────────────┘
  1972.  
  1973.   Remarks:
  1974.  
  1975.   The optional <text> clause  may  be  used  to  specify  the  initial  text
  1976.   displayed on the top of the GROUP_BOX.
  1977.  
  1978.   The initial visibility state of a GROUP_BOX may be set by the  VISIBLE  or
  1979.   INVISIBLE keyword. The default is VISIBLE. The  visibility  state  may  be
  1980.   changed after  dialog  creation  by  using  the  SHOW  GROUP_BOX  or  HIDE
  1981.   GROUP_BOX Statements.
  1982.  
  1983.   The size of the GROUP_BOX is defined with the  SIZE  clause.  The  default
  1984.   units are DIALOG_ROWS and DIALOG_COLUMNS.
  1985.  
  1986.   The position of the GROUP_BOX is defined with the AT clause.  The  default
  1987.   units are DIALOG_ROWS and DIALOG_COLUMNS. The position is relative to  the
  1988.   top left corner of the DIALOG_WINDOW and refers to the  top  left  of  the
  1989.   GROUP_BOX.
  1990.  
  1991.   The AS clause allows a specific reference number to  be  assigned  to  the
  1992.   GROUP_BOX. If not specified, the reference number 1  is  assigned  to  the
  1993.   first GROUP_BOX on the screen that doesn't have an AS clause,  the  number
  1994.   2 is assigned to the second, 3 to the third and so on. If the contents  of
  1995.   the AS clause is an  identifier  that  has  a  numeric  value  of  0,  the
  1996.   identifier will be set to the assigned reference number.
  1997.  
  1998. ┌───────────────────────────┐
  1999. │ 12.19.6 ICON_FIELD Clause │
  2000. └───────────────────────────┘
  2001.  
  2002.   Purpose:
  2003.  
  2004.   An ICON_FIELD is used to include an ICON in the DIALOG_WINDOW.
  2005.  
  2006.   Format:
  2007.  
  2008.   ┌──────────────────────────────────────────────────────────────────────┐
  2009.   │ ICON_FIELD <iconname>                                                │
  2010.   │      [ VISIBLE | INVISIBLE ]                                         │
  2011.   │      [ AT <rowpos> , <colpos> ]                                      │
  2012.   │      [ AS <refno>  ]                                                 │
  2013.   └──────────────────────────────────────────────────────────────────────┘
  2014.  
  2015.   Remarks:
  2016.  
  2017.   <iconname> is the name of the icon to be displayed on the  dialog.  If  it
  2018.   is not the fully qualified name, the default directory  for  the  icon  is
  2019.   set by the ICON_DIRECTORY Customization Variable.  This  variable  can  be
  2020.   viewed or modified by requesting System Configuration from  the  Utilities
  2021.   Pull Down Menu on any Phone Book.
  2022.  
  2023.   The initial visibility state of an ICON_FIELD may be set  by  the  VISIBLE
  2024.   or INVISIBLE keyword. The default is VISIBLE. The visibility state may  be
  2025.   changed after dialog  creation  by  using  the  SHOW  ICON_FIELD  or  HIDE
  2026.   ICON_FIELD Statements.
  2027.  
  2028.   The position of the ICON_FIELD is defined in the AT  clause.  The  default
  2029.   units are DIALOG_ROWS and DIALOG_COLUMNS. The position is relative to  the
  2030.   top left corner of the DIALOG_WINDOW and refers to the  top  left  of  the
  2031.   ICON_FIELD.
  2032.  
  2033.   The AS clause allows a specific reference number to  be  assigned  to  the
  2034.   ICON_FIELD. If not specified, the reference number 1 is  assigned  to  the
  2035.   first ICON_FIELD on the screen that doesn't have an AS clause, the  number
  2036.   2 is assigned to the second, 3 to the third and so on. If the contents  of
  2037.   the AS clause is an  identifier  that  has  a  numeric  value  of  0,  the
  2038.   identifier will be set to the assigned reference number.
  2039.  
  2040. ┌─────────────────────────┐
  2041. │ 12.19.7 LIST_BOX Clause │
  2042. └─────────────────────────┘
  2043.  
  2044.   Purpose:
  2045.  
  2046.   A LIST_BOX is a  rectangular  box  that  contains  a  scrollable  list  of
  2047.   choices from which users can select one or  multiple  (MULTIPLE_SELECTION)
  2048.   choices from.
  2049.  
  2050.   Format:
  2051.  
  2052.   ┌──────────────────────────────────────────────────────────────────────┐
  2053.   │ LIST_BOX <text>                                                      │
  2054.   │      [ VISIBLE | INVISIBLE ]                                         │
  2055.   │      [ ENABLED | DISABLED ]                                          │
  2056.   │      [ USING  < sortstr> ]                                           │
  2057.   │      [ LINES ... , ... ]                                             │
  2058.   │      [ HORIZONTAL_SCROLL_BAR ]                                       │
  2059.   │      [ MULTIPLE_SELECTION ]                                          │
  2060.   │      [ SIZE <rowsize> , <colsize> ]                                  │
  2061.   │      [ ACTION <label> ]                                              │
  2062.   │      [ AT < rowpos> , <colpos> ]                                     │
  2063.   │      [ AS <refno>  ]                                                 │
  2064.   └──────────────────────────────────────────────────────────────────────┘
  2065.  
  2066.  
  2067.   Remarks:
  2068.  
  2069.   The initial visibility state of the LIST_BOX may be set by the VISIBLE  or
  2070.   INVISIBLE keyword. The default is VISIBLE. The  visibility  state  may  be
  2071.   changed after dialog creation by using the SHOW LIST_BOX or HIDE  LIST_BOX
  2072.   Statements.
  2073.  
  2074.   The initial selectability state of the LIST_BOX may be set by the  ENABLED
  2075.   or DISABLED keyword. The default is ENABLED. The selectability  state  may
  2076.   be changed after dialog creation by using the ENABLE LIST_BOX  or  DISABLE
  2077.   LIST_BOX Statements. If a LIST_BOX is DISABLED  the  selection  cannot  be
  2078.   changed.
  2079.  
  2080.   The USING clause uses a subset of the SORT USING options. This allows  you
  2081.   to explicitly specify the order items will be placed in the LIST_BOX.  The
  2082.   valid options are 'T1' (ASCII collating sequence), 'T2' (dictionary  order
  2083.   i.e.  case  insensitive),  'T3'  (numeric),  'A'  (ascending),  and  'D'
  2084.   (descending). See the SORT Statement for more details.
  2085.  
  2086.   The initial contents of a LIST_BOX is set by the optional LINES (or  LINE)
  2087.   clause. The LINES clause consists of 1  or  more  comma  separated  string
  2088.   expressions and or array ranges:
  2089.  
  2090.   ┌──────────────────────────────────────────────────────────────────────┐
  2091.   │ LINES  {string [ SELECTED ]         }  [, ...]                       │
  2092.   │        {array [ FROM dim1 [ ,dim2 ] ...]                             │
  2093.   │             [ TO   dim1 [,dim2 ] ...]    }                           │
  2094.   └──────────────────────────────────────────────────────────────────────┘
  2095.  
  2096.   The  keyword  SELECTED  may  be  associated  with  a  particular  string
  2097.   specification to select that line. The SELECT and DESELECT Statements  may
  2098.   be used after dialog creation to change the selection.  The  SELECTED_LINE
  2099.   Function may be used to determine which line or lines are selected.
  2100.  
  2101.   A  horizontal  scroll  bar  may  be  included  in  the  LIST_BOX  if  the
  2102.   HORIZONTAL_SCROLL_BAR keyword is specified.
  2103.  
  2104.   By default only 1 item may be selected at a time. Multiple selections  may
  2105.   be made if the MULTIPLE_SELECTION keyword is specified.
  2106.  
  2107.   The size of the LIST_BOX is defined in the SIZE clause. The default  units
  2108.   are DIALOG_ROWS and DIALOG_COLUMNS.
  2109.  
  2110.   The ACTION clause allows you  to  specify  a  <label>  that  will  receive
  2111.   control after an element has been selected or deselected in the  LIST  BOX
  2112.   has been pressed. If the action is triggered, ACTION_WINDOW  will  be  set
  2113.   to the window number specified  in  the  CREATE  DIALOG_WINDOW  Statement,
  2114.   ACTION_ID will be set to the LIST BOX's reference number (see  AS  clause)
  2115.   and ACTION_TYPE will be set to 7.  The ACTION will also  be  triggered  if
  2116.   the MOUSE is Double Clicked over an element.  In  this  case,  ACTION_TYPE
  2117.   will be set to 8.
  2118.  
  2119.   The position of the LIST_BOX is defined in  the  AT  clause.  The  default
  2120.   units are DIALOG_ROWS and DIALOG_COLUMNS. The position is relative to  the
  2121.   top left corner of the DIALOG_WINDOW and refers to the  top  left  of  the
  2122.   LIST_BOX.
  2123.  
  2124.   The AS clause allows a specific reference number to  be  assigned  to  the
  2125.   LIST_BOX. If not specified, the reference number  1  is  assigned  to  the
  2126.   first LIST_BOX on the screen that doesn't have an AS clause, the number  2
  2127.   is assigned to the second, 3 to the third and so on. If  the  contents  of
  2128.   the AS clause is an  identifier  that  has  a  numeric  value  of  0,  the
  2129.   identifier will be set to the assigned reference number.
  2130.  
  2131. ┌──────────────────────────────────────┐
  2132. │ 12.19.8 MULTILINE_ENTRY_FIELD Clause │
  2133. └──────────────────────────────────────┘
  2134.  
  2135.   Purpose:
  2136.  
  2137.   A MULTILINE_ENTRY_FIELD is a rectangular area of the dialog that  displays
  2138.   multiple lines of text that the user  can  edit.  Scroll  bars  appear  if
  2139.   requested.
  2140.  
  2141.   Format:
  2142.  
  2143.   ┌──────────────────────────────────────────────────────────────────────┐
  2144.   │ MULTILINE_ENTRY_FIELD                                                │
  2145.   │     [ LINES <list-of-lines> ]                                        │
  2146.   │     [ VISIBLE | INVISIBLE ]                                          │
  2147.   │     [ ENABLED | DISAB LED ]                                          │
  2148.   │     [ TEXT_SIZE <maxchars> ]                                         │
  2149.   │     [ WORD_WRAP ]                                                    │
  2150.   │     [ READ_ONLY ]                                                    │
  2151.   │     [ HORIZONTAL_SCROLL_BAR ]                                        │
  2152.   │     [ VERTICAL_SCROLL_BAR ]                                          │
  2153.   │     [ BORDER 0 | 1 ]                                                 │
  2154.   │     [ SIZE <rowsize> , <colsize> ]                                   │
  2155.   │     [ AT < rowpos> , <colpos> ]                                      │
  2156.   │     [ ACTION <label ]                                                │
  2157.   │     [ AS <refno> ]                                                   │
  2158.   └──────────────────────────────────────────────────────────────────────┘
  2159.  
  2160.   Remarks
  2161.  
  2162.   The initial contents is set by the optional LINES (or  LINE)  clause.  The
  2163.   LINES clause consists of 1 or more comma separated string expressions  and
  2164.   or array ranges:
  2165.  
  2166.   ┌──────────────────────────────────────────────────────────────────────┐
  2167.   │ LINES  {string                 }    [, ...]                          │
  2168.   │        {array [ FROM dim1 [ ,dim2 ] ...]                             │
  2169.   │             [ TO   dim1 [,dim2 ] ...]    }                           │
  2170.   └──────────────────────────────────────────────────────────────────────┘
  2171.  
  2172.   The  maximum  number  of  characters  that  may  be  entered  into  a
  2173.   MULTILINE_ENTRY_FIELD is determined by the TEXT_SIZE clause.  By  default,
  2174.   TEXT_SIZE is unlimited.
  2175.  
  2176.   The initial visibility state of the field may be set  by  the  VISIBLE  or
  2177.   INVISIBLE keyword. The default is VISIBLE. The  visibility  state  may  be
  2178.   changed after dialog creation by using the SHOW  MULTILINE_ENTRY_FIELD  or
  2179.   HIDE MULTILINE_ENTRY_FIELD Statements.
  2180.  
  2181.   The initial selectability state of the MULTILINE_ENTRY_FIELD  may  be  set
  2182.   by  the  ENABLED  or  DISABLED  keyword.  The  default  is  ENABLED.  The
  2183.   selectability state may be changed after  dialog  creation  by  using  the
  2184.   ENABLE MULTILINE_ENTRY_FIELD or DISABLE MULTILINE_ENTRY_FIELD  Statements.
  2185.   If a MULTILINE_ENTRY_FIELD is DISABLED it cannot be modified by  the  user
  2186.   or accessed from the keyboard or by the mouse.
  2187.  
  2188.   If the READ_ONLY keyword is specified, the ENTRY_FIELD cannot be  modified
  2189.   by the user.  This feature can be used to create scrollable  text  windows
  2190.   for tutorial or help information.
  2191.  
  2192.   The BORDER clause defines the type of border  that  is  drawn  around  the
  2193.   MULTILINE_ENTRY_FIELD. 0 specifies no border and 1 specifies a  thin  line
  2194.   border. The default is BORDER 1.
  2195.  
  2196.   Horizontal and or vertical scroll bars may be included by  specifying  the
  2197.   HORIZONTAL_SCROLL_BAR  and  VERTICAL_SCROLL_BAR  keywords.  If  the
  2198.   HORIZONTAL_SCROLL_BAR keyword is not specified, the  characters  that  can
  2199.   be entered onto a line in the field is limited by the field width.  If  it
  2200.   is included, the number of characters that can  be  entered  on  a  single
  2201.   line is limited only by TEXT_SIZE.
  2202.  
  2203.   If the VERTICAL_SCROLL_BAR keyword is not specified, the number  of  lines
  2204.   that can be entered is limited by the field  height.    If  included,  the
  2205.   number of lines that can be entered is limited only by TEXT_SIZE.
  2206.  
  2207.   The size of the MULTILINE_ENTRY_FIELD is defined in the SIZE  clause.  The
  2208.   default units are DIALOG_ROWS and DIALOG_COLUMNS. The standard height  for
  2209.   a multiline entry field is 8 DIALOG_ROWS per text row displayed.
  2210.  
  2211.   The position of the MULTILINE_ENTRY_FIELD is defined  in  the  AT  clause.
  2212.   The default units are DIALOG_ROWS  and  DIALOG_COLUMNS.  The  position  is
  2213.   Relative to the top left corner of the DIALOG_WINDOW. The position  refers
  2214.   to top left of field's text, not its border.
  2215.  
  2216.   The ACTION clause allows you  to  specify  a  <label>  that  will  receive
  2217.   control after a field has been modified and the keyboard focus  has  moved
  2218.   to another field. If the action is triggered, ACTION_WINDOW  will  be  set
  2219.   to the window number specified  in  the  CREATE  DIALOG_WINDOW  Statement,
  2220.   ACTION_ID will be set  to  the  MULTILINE_ENTRY_FIELD's  reference  number
  2221.   (see AS clause) and ACTION_TYPE will be set to 6 (field changed).
  2222.  
  2223.   The AS clause allows a specific reference number to  be  assigned  to  the
  2224.   MULTILINE_ENTRY_FIELD.  If  not  specified,  the  reference  number  1  is
  2225.   assigned to the first MULTILINE_ENTRY_FIELD on  the  screen  that  doesn't
  2226.   have an AS clause, the number 2 is assigned to the second, 3 to the  third
  2227.   and so on.  If the contents of the AS clause is an identifier that  has  a
  2228.   numeric value of 0, the identifier will be set to the  assigned  reference
  2229.   number.
  2230.  
  2231.   The contents of  a  MULTILINE_ENTRY_FIELD  may  be  determined  using  the
  2232.   TEXT_OF Function.
  2233.  
  2234. ┌────────────────────────────┐
  2235. │ 12.19.9 PUSH_BUTTON Clause │
  2236. └────────────────────────────┘
  2237.  
  2238.   Purpose:
  2239.  
  2240.   A PUSH_BUTTON is a box that contains  a  string.  When  a  PUSH_BUTTON  is
  2241.   pushed, by clicking the mouse on it or by pressing the  spacebar  when  it
  2242.   is active, an action is triggered.
  2243.  
  2244.   Format:
  2245.  
  2246.   ┌──────────────────────────────────────────────────────────────────────┐
  2247.   │ PUSH_BUTTON <text>                                                   │
  2248.   │      [ VISIBLE | INVISIBLE ]                                         │
  2249.   │      [ ENABLED | DISABLED ]                                          │
  2250.   │      [ BORDER 0 | 1 ]                                                │
  2251.   │      [ ENTER ]                                                       │
  2252.   │      [ ESCAPE ]                                                      │
  2253.   │      [ SIZE <rowsize> , <colsize> ]                                  │
  2254.   │      [ AT <rowpos> , <colpos> ]                                      │
  2255.   │      [ ACTION <label> ]                                              │
  2256.   │      [ AS <refno> ]                                                  │
  2257.   └──────────────────────────────────────────────────────────────────────┘
  2258.  
  2259.   Remarks:
  2260.  
  2261.   <text> sets the initial text of the PUSH_BUTTON. It is  required.  It  may
  2262.   be changed after dialog creation by using the SET PUSH_BUTTON Statement.
  2263.  
  2264.   The initial visibility state of the button may be set by  the  VISIBLE  or
  2265.   INVISIBLE keyword. The default is VISIBLE. The  visibility  state  may  be
  2266.   changed after dialog creation  by  using  the  SHOW  PUSH_BUTTON  or  HIDE
  2267.   PUSH_BUTTON Statements.
  2268.  
  2269.   The initial selectability state of the  PUSH_BUTTON  may  be  set  by  the
  2270.   ENABLED or DISABLED keyword. The default  is  ENABLED.  The  selectability
  2271.   state  may  be  changed  after  dialog  creation  by  using  the  ENABLE
  2272.   PUSH_BUTTON  or  DISABLE  PUSH_BUTTON  Statements.  If  a  PUSH_BUTTON  is
  2273.   DISABLED it is displayed in halftone and cannot be pushed.
  2274.  
  2275.   The BORDER clause defines the type of border  that  is  drawn  around  the
  2276.   PUSH_BUTTON. 0 specifies no border.  The default is BORDER 1.
  2277.  
  2278.   The ENTER keyword causes the PUSH_BUTTON's ACTION to be triggered  if  the
  2279.   ENTER key is pressed and focus is on a non PUSH_BUTTON  control.  This  is
  2280.   normally used to establish a default PUSH_BUTTON.  There  should  only  be
  2281.   one PUSH_BUTTON with the ENTER keyword per dialog.
  2282.  
  2283.   The ESCAPE keyword causes the PUSH_BUTTON's ACTION to be triggered if  the
  2284.   ESCAPE key is pressed.  This  is  normally  used  in  association  with  a
  2285.   "Cancel" PUSH_BUTTON. There  should  only  by  one  PUSH_BUTTON  with  the
  2286.   ESCAPE keyword per dialog.
  2287.  
  2288.   The size of the PUSH_BUTTON is defined in the  SIZE  clause.  The  default
  2289.   units are DIALOG_ROWS and DIALOG_COLUMNS. If no SIZE clause  is  specified
  2290.   the SIZE will  default  to  a  size  sufficient  to  display  <text>.  The
  2291.   standard height  for  a  PUSH_BUTTON  is  13  DIALOG_ROWS.  The  width  is
  2292.   dependant on the contents of <text>.
  2293.  
  2294.   The position of the PUSH_BUTTON is defined in the AT clause.  The  default
  2295.   units are DIALOG_ROWS and DIALOG_COLUMNS. The position is relative to  the
  2296.   top left corner of the DIALOG_WINDOW and specifies the top left corner  of
  2297.   the PUSH_BUTTON.
  2298.  
  2299.   The ACTION clause allows you  to  specify  a  <label>  that  will  receive
  2300.   control after a PUSH_BUTTON has been pressed. If the action is  triggered,
  2301.   ACTION_WINDOW will be set to the window number  specified  in  the  CREATE
  2302.   DIALOG_WINDOW statement,  ACTION_ID  will  be  set  to  the  PUSH_BUTTON's
  2303.   reference number (see AS clause) and ACTION_TYPE will be set to 5  (button
  2304.   pressed). If no ACTION clause is specified in the PUSH_BUTTON  definition,
  2305.   the ACTION associated with the dialog window will be  triggered,  if  any.
  2306.   When a PUSH_BUTTON ACTION is  triggered,  the  DIALOG_WINDOW  is  disabled
  2307.   until a RESUME ACTION Statement is  executed  (You  can  issue  an  ENABLE
  2308.   DIALOG_WINDOW Statement to enable the window prior to the RESUME).
  2309.  
  2310.   The AS clause allows a specific reference number to  be  assigned  to  the
  2311.   PUSH_BUTTON. If not specified, the reference number 1 is assigned  to  the
  2312.   first PUSH_BUTTON on the screen  that  doesn't  have  an  AS  clause,  the
  2313.   number 2 is assigned to the second, 3 to the  third  and  so  on.  If  the
  2314.   contents of the AS clause is an identifier that has a numeric value of  0,
  2315.   the identifier will be set to the assigned reference number.
  2316.  
  2317.   The contents  of  a  PUSH_BUTTON  may  be  determined  using  the  TEXT_OF
  2318.   Function.
  2319.  
  2320. ┌──────────────────────────────┐
  2321. │ 12.19.10 RADIO_BUTTON Clause │
  2322. └──────────────────────────────┘
  2323.  
  2324.   Purpose:
  2325.  
  2326.   A RADIO_BUTTON is a small circle with associated text to the right. It  is
  2327.   used to select a single item from a list. When clicked  it  checks  itself
  2328.   and automatically unchecks all other radio buttons with the same group  (a
  2329.   group is a set of contiguous RADIO_BUTTONS).
  2330.  
  2331.   Format:
  2332.  
  2333.   ┌──────────────────────────────────────────────────────────────────────┐
  2334.   │ RADIO_BUTTON <text>                                                  │
  2335.   │     [ VISIBLE | INVISIBLE ]                                          │
  2336.   │     [ ENABLED | DISABLED ]                                           │
  2337.   │     [ CHECKED | UNCHECKED ]                                          │
  2338.   │     [ SIZE <rowsize> , <colsize> ]                                   │
  2339.   │     [ AT <rowpos> , <colpos> ]                                       │
  2340.   │     [ ACTION <label> ]                                               │
  2341.   │     [ AS <refno> ]                                                   │
  2342.   └──────────────────────────────────────────────────────────────────────┘
  2343.  
  2344.   Remarks:
  2345.  
  2346.   <text> sets the initial text of the RADIO_BUTTON. It is required.  It  may
  2347.   be changed after dialog create by using the SET RADIO_BUTTON Statement.
  2348.  
  2349.   The initial visibility state of the button may be set by  the  VISIBLE  or
  2350.   INVISIBLE keyword. The default is VISIBLE. The  visibility  state  may  be
  2351.   changed after dialog creation by  using  the  SHOW  RADIO_BUTTON  or  HIDE
  2352.   RADIO_BUTTON Statements.
  2353.  
  2354.   The initial selectability state of the RADIO_BUTTON  may  be  set  by  the
  2355.   ENABLED or DISABLED keyword. The default  is  ENABLED.  The  selectability
  2356.   state  may  be  changed  after  dialog  creation  by  using  the  ENABLE
  2357.   RADIO_BUTTON or DISABLE RADIO_BUTTON  Statements.  If  a  RADIO_BUTTON  is
  2358.   DISABLED it is displayed in halftone and cannot be clicked.
  2359.  
  2360.   The initial checked state may  be  set  by  using  the  CHECK  or  UNCHECK
  2361.   keywords. The default is UNCHECKed.  The  CHECKed  state  may  be  changed
  2362.   after  dialog  creation  by  using  the  CHECK  RADIO_BUTTON  or  UNCHECK
  2363.   RADIO_BUTTON Statements. The current check state may be determined by  the
  2364.   IS_CHECKED Function.
  2365.  
  2366.   The size of the RADIO_BUTTON is defined in the SIZE  clause.  The  default
  2367.   units are DIALOG_ROWS and DIALOG_COLUMNS. If no SIZE clause  is  specified
  2368.   the SIZE will default to the minimum size to display <text>. The  standard
  2369.   height for a RADIO_BUTTON is 10 DIALOG_ROWS. The  width  is  dependant  on
  2370.   the contents of <text>.
  2371.  
  2372.   The position of the RADIO_BUTTON is defined in the AT clause. The  default
  2373.   units are DIALOG_ROWS and DIALOG_COLUMNS. The position is relative to  the
  2374.   top left corner of the DIALOG_WINDOW and specifies the top left corner  of
  2375.   the RADIO_BUTTON.
  2376.  
  2377.   The ACTION clause allows you  to  specify  a  <label>  that  will  receive
  2378.   control  after  a  RADIO_BUTTON  has  been  pressed.  If  the  action  is
  2379.   triggered, ACTION_WINDOW will be set to the  window  number  specified  in
  2380.   the  CREATE  DIALOG_WINDOW  statement,  ACTION_ID  will  be  set  to  the
  2381.   PUSH_BUTTON's reference number (see AS clause)  and  ACTION_TYPE  will  be
  2382.   set to 5 (button pressed).
  2383.  
  2384.   The AS clause allows a specific reference number to  be  assigned  to  the
  2385.   RADIO_BUTTON. If not specified, the reference number 1 is assigned to  the
  2386.   first RADIO_BUTTON on the screen that  doesn't  have  an  AS  clause,  the
  2387.   number 2 is assigned to the second, 3 to the  third  and  so  on.  If  the
  2388.   contents of the AS clause is an identifier that has a numeric value of  0,
  2389.   the identifier will be set to the assigned reference number.
  2390.  
  2391.   The <text> associated with a RADIO_BUTTON  may  be  determined  using  the
  2392.   TEXT_OF Function.
  2393.  
  2394. ┌────────────────────────────┐
  2395. │ 12.19.11 TEXT_FIELD Clause │
  2396. └────────────────────────────┘
  2397.  
  2398.   Purpose:
  2399.  
  2400.   The TEXT_FIELD clause describes text that appears within a  DIALOG_WINDOW.
  2401.   It may be specified in the CREATE DIALOG_WINDOW or  ADD  TO  DIALOG_WINDOW
  2402.   Statements.
  2403.  
  2404.   Format:
  2405.  
  2406.   ┌──────────────────────────────────────────────────────────────────────┐
  2407.   │ TEXT_FIELD <text>                                                    │
  2408.   │      [ VISIBLE | INVISIBLE ]                                         │
  2409.   │      [ ENABLED | DISABLED ]                                          │
  2410.   │      [ ALIGN_TOP | ALIGN_VCENTER | ALIGN_BOTTOM ]                    │
  2411.   │      [ ALIGN_LEFT | ALIGN_CENTER | ALIGN_RIGHT ]                     │
  2412.   │      [ WORD_WRAP ]                                                   │
  2413.   │      [ SIZE <rowsize> , <colsize> ]                                  │
  2414.   │      [ AT <rowpos> , <colpos> ]                                      │
  2415.   │      [ AS <refno> ]                                                  │
  2416.   └──────────────────────────────────────────────────────────────────────┘
  2417.  
  2418.   Remarks:
  2419.  
  2420.   <text> sets the initial text of the TEXT_FIELD. It is required. It may  be
  2421.   changed after dialog create by using the SET TEXT_FIELD Statement.
  2422.  
  2423.   The initial visibility state of the text may be  set  by  the  VISIBLE  or
  2424.   INVISIBLE keyword. The default is VISIBLE. The  visibility  state  may  be
  2425.   changed after dialog  creation  by  using  the  SHOW  TEXT_FIELD  or  HIDE
  2426.   TEXT_FIELD Statements.
  2427.  
  2428.   The initial selectability state of  the  TEXT_FIELD  may  be  set  by  the
  2429.   ENABLED or DISABLED keyword. The default  is  ENABLED.  The  selectability
  2430.   state may be changed after dialog creation by using the ENABLE  TEXT_FIELD
  2431.   or DISABLE TEXT_FIELD Statements.  If  a  TEXT_FIELD  is  DISABLED  it  is
  2432.   displayed in halftone.
  2433.  
  2434.   The size of the TEXT_FIELD is defined in  the  SIZE  clause.  The  default
  2435.   units are DIALOG_ROWS and DIALOG_COLUMNS. If no SIZE clause  is  specified
  2436.   the size will default to the minimum size needed to  display  <text>.  The
  2437.   standard height for a single line of text is 8 DIALOG_ROWS. The  width  is
  2438.   dependant on the contents of <text>. For most uses the  SIZE  clause  does
  2439.   not have to be specified.
  2440.  
  2441.   The position of the TEXT_FIELD is defined in the AT  clause.  The  default
  2442.   units are DIALOG_ROWS and DIALOG_COLUMNS. The position is relative to  the
  2443.   top left corner of the DIALOG_WINDOW.
  2444.  
  2445.   The text can be automatically aligned and justified within the  TEXT_FIELD
  2446.   by specifying ALIGN_TOP, ALIGN_VCENTER, ALIGN_BOTTOM  and/or ALIGN_LEFT,
  2447.   ALIGN_CENTER, ALIGN_RIGHT. The defaults are ALIGN_TOP and ALIGN_LEFT.
  2448.  
  2449.   Text can be automatically word-wrapped within a  multiline  TEXT_FIELD  by
  2450.   including the  WORD_WRAP  keyword  (only  valid  for  ALIGN_TOP/ALIGN_LEFT
  2451.   fields).
  2452.  
  2453.   The AS clause allows a specific reference number to  be  assigned  to  the
  2454.   TEXT_FIELD. If not specified, the reference number 1 is  assigned  to  the
  2455.   first TEXT_FIELD on the screen that doesn't have an AS clause, the  number
  2456.   2 is assigned to the second, 3 to the third and so on. If the contents  of
  2457.   the AS clause is an  identifier  that  has  a  numeric  value  of  0,  the
  2458.   identifier will be set to the assigned reference number.
  2459.  
  2460.   The contents of a TEXT_FIELD may be determined using the TEXT_OF Function.
  2461.  
  2462.  
  2463.  
  2464.  
  2465.                    12.20 CREATE SESSION_MONITOR Statement                   
  2466.  
  2467.  
  2468. Purpose:
  2469.  
  2470. Creates a SESSION_MONITOR object definition.  A SESSION_MONITOR  object  can
  2471. be used to simultaneously monitor multiple host sessions for the  occurrence
  2472. of text strings, keystrokes, and other events.  These  events  will  trigger
  2473. ACTIONs that cause the AUTOPILOT script to  interrupt  the  statement  being
  2474. executed and begin execution at a defined routine.
  2475. CREATE SESSION_MONITOR is used to define an  object  that  monitors  a  host
  2476. session for the occurrence of one or more of the following events:
  2477.  
  2478. TEXT_WATCH
  2479.        Looks for the occurrence of a text string on host screen.
  2480.  
  2481. HOST_KEY_WATCH
  2482.         Waits for the occurrence of a keystroke entered in the host session.
  2483.  
  2484. When you define an event, you can specify a routine to receive control  when
  2485. they occur. You can also define a  default  routine  that  receives  control
  2486. when an event occurs that does not have a specific routine defined for it.
  2487.  
  2488. OPEN and CLOSE are used to start and stop session monitors defined with  the
  2489. CREATE SESSION_MONITOR statement. Multiple monitors can  be  OPEN'd  at  one
  2490. time (only one per session id). Monitors can be OPEN'd and CLOSE'd  as  many
  2491. times as desired. If you wish to eliminate a monitor  completely  (and  thus
  2492. free its id), use the DESTROY SESSION_MONITOR statement.
  2493.  
  2494. When a monitored event occurs, an action is generated  and  the  appropriate
  2495. AUTOPILOT routine receives control. At this point  the  session  monitor  is
  2496. temporarily disabled (to avoid recursive events). When  the  routine  wishes
  2497. to return to the mainline logic of the AUTOPILOT  program  it  utilizes  the
  2498. RESUME  ACTION  statement.  The  RESUME  action  statement  automatically
  2499. reenables the session monitor. You may issue an ENABLE prior to  the  RESUME
  2500. to enable the session monitor. Also, if you issue a  DISABLE  prior  to  the
  2501. RESUME, the resume will not enable the monitor.
  2502.  
  2503. When a TEXT_WATCH event is generated, if the routine does not  do  something
  2504. to clear the condition (i.e. change the  screen  so  that  the  text  is  no
  2505. longer there), the routine should disable the text watch prior  to  doing  a
  2506. resume so that another action is not immediately generated.
  2507.  
  2508.  
  2509. Format:
  2510.  
  2511.   ┌──────────────────────────────────────────────────────────────────────┐
  2512.   │ CREATE SESSION_MONITOR id                                            │
  2513.   │      [ SESSION sessid ]                                              │
  2514.   │      [ ACTION label ]                                                │
  2515.   │      [ ENABLED|DISABLED ]                                            │
  2516.   │      [ TEXT_WATCH clause ]...                                        │
  2517.   │      [ HOST_KEY_WATCH clause ] ...                                   │
  2518.   │ END_CREATE                                                           │
  2519.   └──────────────────────────────────────────────────────────────────────┘
  2520.  
  2521. Remarks:
  2522.  
  2523. id
  2524.    may be either:
  2525.  
  2526.   1. An integer expression such that 0 < id < 32.
  2527.   2. An identifier set to zero. If this is the case, the identifier will  be
  2528.       set to a monitor id automatically assigned to this monitor.
  2529.  
  2530. sessid
  2531.    is the single letter EHLLAPI session-id or the 2 to 8  character  EHLLAPI
  2532.    session-name of the session to monitor.
  2533.  
  2534. label
  2535.    is a label in your AUTOPILOT program that receives control if  a  monitor
  2536.    item (ex: TEXT_WATCH) with no ACTION clause of its own is triggered.
  2537.  
  2538. ENABLED  and  DISABLED  may  used  to  specify  the  initial  state  of  a
  2539. SESSION_MONITOR.
  2540.  
  2541. The TEXT_WATCH clause defines a  monitor  item  that  is  triggered  when  a
  2542. particular text string appears on the host. It is  documented  below.  There
  2543. may be more than one TEXT_WATCH in a single SESSION_MONITOR.
  2544.  
  2545. The HOST_KEY_WATCH clause defines a monitor item that is  triggered  when  a
  2546. key is pressed in the host session. It is documented  below.  There  may  be
  2547. more than one HOST_KEY_WATCH in a single SESSION_MONITOR.
  2548.  
  2549. A  SESSION_MONITOR  is  not  active  until  it  is  opened.  See  OPEN
  2550. SESSION_MONITOR.
  2551.  
  2552.  
  2553. Examples:
  2554.  
  2555.   CREATE SESSION_MONITOR sessmon
  2556.       TEXT_WATCH "HOLDING" AT 24,60
  2557.             ACTION do_holding
  2558.       TEXT_WATCH "LOGOFF AT ??:??:??"
  2559.             ACTION did_logoff
  2560.       HOST_KEY_WATCH "PF3"
  2561.             ACTION did_PF3
  2562.   END_CREATE
  2563.  
  2564. ┌───────────────────────────┐
  2565. │ 12.20.1 TEXT_WATCH Clause │
  2566. └───────────────────────────┘
  2567.  
  2568.   Purpose:
  2569.  
  2570.   Defines a monitor item that is triggered when  a  particular  text  string
  2571.   appears on the host.
  2572.  
  2573.   Format:
  2574.  
  2575.   ┌──────────────────────────────────────────────────────────────────────┐
  2576.   │ TEXT_WATCH string                                                    │
  2577.   │      [ AT row,col ] | [ [ FROM row,col ] [ TO row,col ] ]            │
  2578.   │      [ ENABLED|DISABLED ]                                            │
  2579.   │      [ ACTION label ]                                                │
  2580.   │      [ AS id ]                                                       │
  2581.   └──────────────────────────────────────────────────────────────────────┘
  2582.  
  2583.  
  2584.   Remarks:
  2585.  
  2586.   The occurrence of string on the host triggers an action. string can  do  a
  2587.   pattern search in the same manner as the WAIT statement.
  2588.  
  2589.   AT/FROM/TO can be used to limit the  area  on  the  host  screen  that  is
  2590.   searched.
  2591.  
  2592.   ENABLED and DISABLED may used to specify  the  initial  state  of  a  text
  2593.   watch item.
  2594.  
  2595.   label
  2596.      is a label in your AUTOPILOT program that receives  control  if  string
  2597.      is found on the host screen.
  2598.  
  2599.   id
  2600.      may be either:
  2601.  
  2602.     1. An integer expression such that 0 < id < 10000.
  2603.     2. An identifier set to zero. If this is the case, the  identifier  will
  2604.         be set to an id automatically assigned to this item.
  2605.  
  2606. ┌───────────────────────────────┐
  2607. │ 12.20.2 HOST_KEY_WATCH Clause │
  2608. └───────────────────────────────┘
  2609.  
  2610.   Purpose:
  2611.  
  2612.   Defines a monitor item that is triggered when a particular key is  pressed
  2613.   in a host session.
  2614.  
  2615.   Format:
  2616.  
  2617.   ┌──────────────────────────────────────────────────────────────────────┐
  2618.   │ HOST_KEY_WATCH key                                                   │
  2619.   │          [ ENABLED|DISABLED ]                                        │
  2620.   │          [ ACTION label ]                                            │
  2621.   │          [ AS id ]                                                   │
  2622.   └──────────────────────────────────────────────────────────────────────┘
  2623.  
  2624.   Remarks:
  2625.  
  2626.   When key is pressed in the host session an action is  triggered.  key  may
  2627.   be one of the following:
  2628.  
  2629.     1. One of the AUTOPILOT defined key names such as PF1 or ENTER.
  2630.  
  2631.     2. A string that is equal to one of the AUTOPILOT defined key  names  or
  2632.        one of the names in the Associated Host Key  field  in  the  keyboard
  2633.        definition for a  particular  keystroke.  For  example:  PF1,  ENTER,
  2634.        KEYPAD_0.
  2635.  
  2636.     3. A single character string such as "A" or "B".
  2637.  
  2638.     4. An HLLAPI mnemonic such as "@Aa" (ALT+A) or "@S1" for Shift+F1.
  2639.  
  2640.   For TalkThru sessions, a  key  name  is  defined  via  its  entry  in  the
  2641.   session's keyboard definition (SETTINGS/KEYBOARD). This is the  name  that
  2642.   is used to both send and trap the key.
  2643.  
  2644.   A key is named first by the contents of the  Associated  Host  Key  field.
  2645.   This field contains a host protocol style name  such  as  PF1,  ENTER,  or
  2646.   DELETE_LINE.
  2647.  
  2648.   If this Associated Host Key field is empty, the key cannot be trapped.
  2649.  
  2650.   For example to intercept a key that is defined as ...
  2651.  
  2652.                      PC Key  Host Key  Assigned Action  
  2653.                      ALT,1   PF1       ESC,1,CR         
  2654.  
  2655.   you would use PF1 (not "@A1").
  2656.  
  2657.   If the key was defined without a host key name as ...
  2658.  
  2659.                      PC Key  Host Key  Assigned Action  
  2660.                      ALT,1             ESC,1,CR         
  2661.  
  2662.   you would not be able to intercept it.
  2663.  
  2664.   If a key is not defined at all, you cannot trap it unless it is  a  single
  2665.   character in combination with shift/alt/ctrl, such  as  alt+a.  You  could
  2666.   not intercept a key such AS <F1> or <ENTER> unless it was defined.
  2667.  
  2668.   To intercept this  type  of  undefined  keys,  use  its  ASCII  or  HLLAPI
  2669.   mnemonic value in a string. For example use "@Aa" for <alt+a>.
  2670.  
  2671.   If you wish to intercept a key, its generally best to define it and use  a
  2672.   host key name. You can also use the UNASSIGNED command if you  don't  want
  2673.   the key to actually send anything when pressed. For example the  following
  2674.   key definition could be used to allow an AUTOPILOT program to be  notified
  2675.   when SHIFT+F1 was pressed:
  2676.  
  2677.                     PC Key    Host Key  Assigned Action  
  2678.                     SHIFT,F1  UK1       UNASSIGNED       
  2679.  
  2680.   The HOST_KEY_WATCH clause used would look something like this:
  2681.  
  2682.       HOST_KEY_WATCH UK1 ACTION sf1_pressed
  2683.  
  2684.   The Host Key name UK1 was chosen rather arbitrarily--a host  key  name  is
  2685.   really just a label that AUTOPILOT (and HLLAPI) use to refer to a  key--it
  2686.   has no other significance.
  2687.  
  2688.   When a key is intercepted, it is NOT sent to the  host.  If  you  wish  to
  2689.   send it, you should do so in your ACTION routine.
  2690.  
  2691.   AUTOPILOT uses the Keystroke  Intercept  facility  of  HLLAPI  to  monitor
  2692.   keystrokes.  When using AUTOPILOT to monitor keystrokes  in  a  3rd  party
  2693.   program  (such  as  Communications  Manager),  restrictions  on  undefined
  2694.   keystrokes may differ.
  2695.  
  2696.   ENABLED and DISABLED may be used to specify the initial  state  of  a  key
  2697.   watch item.
  2698.  
  2699.   label
  2700.      is a label in your AUTOPILOT program that receives control the  key  is
  2701.      pressed.
  2702.  
  2703.   id
  2704.      may be either:
  2705.  
  2706.     1. An integer expression such that 0  id  10000.
  2707.     2. An identifier set to zero. If this is the case, the  identifier  will
  2708.         be set to an id automatically assigned
  2709.  
  2710.  
  2711.   See Also:
  2712.  
  2713.     CREATE/DESTROY
  2714.     OPEN/CLOSE
  2715.     ENABLE/DISABLE
  2716.     ADD/DELETE
  2717.     SET
  2718.     TEXT_OF
  2719.     IS_DISABLED
  2720.  
  2721.  
  2722.  
  2723.  
  2724.                     12.21 DDE_EXECUTE Statement (Client)                    
  2725.  
  2726.  
  2727. Purpose:
  2728.  
  2729. Sends a command to a DDE server.
  2730.  
  2731. Format:
  2732.  
  2733.   ┌──────────────────────────────────────────────────────────────────────┐
  2734.   │ DDE_EXECUTE TOPIC(id) [ IN DDE_LINK(linkid ) ]                       │
  2735.   │                          command                                     │
  2736.   │                         [ ,command... ]                              │
  2737.   └──────────────────────────────────────────────────────────────────────┘
  2738.  
  2739. Remarks:
  2740.  
  2741. This statement instructs the DDE server to execute the command specified  by
  2742. command.  A server application will  document  the  commands  that  it  will
  2743. respond  to.
  2744.  
  2745. The IN DDE_LINK clause in required only if there is more than  one  DDE_LINK
  2746. defined and it is not the current default.
  2747.  
  2748. Examples:
  2749.  
  2750.   DDE_EXECUTE TOPIC(1) "[NEW(1)]"
  2751.  
  2752.  
  2753.  
  2754.  
  2755.                      12.22 DDE_POKE Statement (Client)                      
  2756.  
  2757.  
  2758. Purpose:
  2759.  
  2760. Sends unsolicited data to a DDE server.
  2761.  
  2762. Format:
  2763.  
  2764.   ┌──────────────────────────────────────────────────────────────────────┐
  2765.   │ DDE_POKE TOPIC(id) [ IN DDE_LINK(linkid) ]                           │
  2766.   │      itemname WITH value [, itemname WITH value... ]                 │
  2767.   └──────────────────────────────────────────────────────────────────────┘
  2768.  
  2769. Remarks:
  2770.  
  2771. This statement sends the data, specified by  value  ,  to  the  DDE  server.
  2772. itemname is the name of the item which will receive the data in  the  server
  2773. application.  A server application will document the format of the itemname.
  2774.  
  2775. The IN DDE_LINK clause is required only if there is more than  one  DDE_LINK
  2776. defined and it is not the current default.
  2777.  
  2778. Examples:
  2779.  
  2780.   DDE_POKE TOPIC(1) "R1C1" WITH "123.50"
  2781.  
  2782.  
  2783.  
  2784.  
  2785.                     12.23 DDE_REQUEST Statement (Client)                    
  2786.  
  2787.  
  2788. Purpose:
  2789.  
  2790. Receives data from a DDE server.
  2791.  
  2792. Format:
  2793.  
  2794.   ┌──────────────────────────────────────────────────────────────────────┐
  2795.   │ DDE_REQUEST TOPIC(id) [ IN DDE_LINK(linkid) ]                        │
  2796.   │    itemname INTO variable [ ,itemname INTO variable ... ]            │
  2797.   └──────────────────────────────────────────────────────────────────────┘
  2798.  
  2799. Remarks:
  2800.  
  2801. This statement receives data from the DDE server  item  itemname.  The  INTO
  2802. variable clause specifies the  AUTOPILOT  variable  that  will  receive  the
  2803. data.  A server application will document the format of the item name.
  2804.  
  2805. The IN DDE_LINK clause in required only if there is more than  one  DDE_LINK
  2806. defined and it is not the current default.
  2807.  
  2808. Examples:
  2809.  
  2810.   DDE_REQUEST TOPIC (1) "R1C1" INTO myvar
  2811.  
  2812.  
  2813.  
  2814.  
  2815.                     12.24 DDE_UPDATE Statement (Server)                     
  2816.  
  2817.  
  2818. Purpose:
  2819.  
  2820. Update the value of a server's EXPORT_ITEM entry.
  2821.  
  2822. Format:
  2823.  
  2824.   ┌──────────────────────────────────────────────────────────────────────┐
  2825.   │ DDE_UPDATE EXPORT_ITEM(id) [ IN DDE_LINK(linkid) ]                   │
  2826.   │                          WITH value                                  │
  2827.   └──────────────────────────────────────────────────────────────────────┘
  2828.  
  2829. Remarks:
  2830.  
  2831. This statement updates the value of a server's EXPORT_ITEM entry.  The  data
  2832. will be sent to each client that has established a HOT_LINK with this  item.
  2833. Notification will be sent to each client that has  established  a  WARM_LINK
  2834. with this item.  The data  will  also  be  used  to  respond  to  subsequent
  2835. REQUEST transactions from clients.
  2836.  
  2837. The IN DDE_LINK clause is required only if there is more than  one  DDE_LINK
  2838. and it is not the current default.
  2839.  
  2840. Examples:
  2841.  
  2842.   DDE_UPDATE EXPORT_ITEM(1) WITH "123.50"
  2843.  
  2844.  
  2845.  
  2846.  
  2847.                       12.25 DECLARE FUNCTION Statement                      
  2848.  
  2849.  
  2850. Purpose:
  2851.  
  2852. This statement is used to support the ability to  call  functions  available
  2853. in Dynamic Link Libraries (DLLs).  Before using this function, refer to  the
  2854. section,  Calling  DLL  Functions  Directly  in  the  chapter,  AUTOPILOT
  2855. Statements By Category for more information on how this is used.
  2856.  
  2857. Before a DLL function can be called from  AUTOPILOT  it  must  be  declared.
  2858. Declaring a function provides the necessary information to  allow  AUTOPILOT
  2859. to call the function.  Once declared, DLL  functions  can  be  used  exactly
  2860. like other functions in a script.
  2861.  
  2862. Format:
  2863.  
  2864.   ┌──────────────────────────────────────────────────────────────────────┐
  2865.   │ DECLARE FUNCTION function-name[ (parameter-list) ]                   │
  2866.   │                  LIBRARY_NAME libname                                │
  2867.   │                [ FUNCTION_NAME procname ]                            │
  2868.   │                [ RETURN_TYPE type     ]                              │
  2869.   └──────────────────────────────────────────────────────────────────────┘
  2870.  
  2871. Remarks:
  2872.  
  2873. function-name is the name of the function as it will be  referenced  in  the
  2874. script.  The name follows the same  naming  rules  as  that  of  any  script
  2875. identifier (first letter alphabetic, first eight characters significant).
  2876.  
  2877. parameter-list specifies the number and data type  of  parameters  that  the
  2878. function uses. If the function does not  need  any  parameters,  the  clause
  2879. does not need to be specified.  The syntax for a parameter-list is:
  2880.  
  2881.   ( iden-1 [ AS type ] ,  iden-2 [ AS type ] , ... iden-n [ AS type ] )
  2882.  
  2883. iden-n is simply any identifier name.  It serves no purpose  other  than  to
  2884. indicate the presence of a required function parameter.
  2885.  
  2886. type  is  a  string  expression  that  specifies  the  data  format  of  the
  2887. parameter. Unlike AUTOPILOT functions, DLL functions  require  parmaters  to
  2888. be in a specific format. Parameter data types will be discussed below  under
  2889. Parameter Data Types.
  2890.  
  2891. LIBRARY_NAME libname specifies  the  name  of  the  DLL  library  where  the
  2892. function resides.  It is required.
  2893.  
  2894. FUNCTION_NAME procname specifies the name of the function as it  appears  in
  2895. the DLL.  It  is  optional  and  defaults  to  the  first  8  characters  of
  2896. function-name.
  2897.  
  2898. RETURN_TYPE type  specifies  the  data  type  of  the  value  that  function
  2899. returns.  It is optional.
  2900.  
  2901. If the DECLARE FUNCTION Statement  is  successful,  return_code  is  set  to
  2902. zero.  If the function or DLL could not be loaded, return_code is set  to  a
  2903. non-zero value that corresponds to the OS/2 DOS error codes.
  2904.  
  2905.  
  2906. Parameter Data Types:
  2907.  
  2908.  Normally, in AUTOPILOT, you  do  not  have  to  be  concerned  with  the
  2909.  internal data format of an  identifier  or  expression  --  AUTOPILOT  will
  2910.  convert the value to  the  correct  format  as  needed.    However,  a  DLL
  2911.  function is written in a language such as C or  Pascal.    These  languages
  2912.  require that parameters match the data type expected by the function  being
  2913.  called.  The AS type Clause  in  the  parameter  list  specification  tells
  2914.  AUTOPILOT what type of format is expected by the DLL function.  type  is  a
  2915.  string expression that describes the data  format.    The  following  table
  2916.  relates C data types with the corresponding AUTOPILOT type:
  2917.  
  2918.                 'C' type            AUTOPILOT type         
  2919.                 ──────────────────  ─────────────────────  
  2920.                 int (16 or 32 bit)  "int"                  
  2921.                 short (16 bit)      "short"                
  2922.                 long (32 bit)       "long"                 
  2923.                 unsigned short      "ushort"               
  2924.                 unsigned long       "ulong"                
  2925.                 float               Unsupported            
  2926.                 double              Unsupported            
  2927.                 char *              "string" or "pstring"  
  2928.                 int *               "pint"                 
  2929.                 short *             "pshort"               
  2930.                 long *              "plong"                
  2931.                 unsigned short *    "pushort"              
  2932.                 unsigned long *     <%4><T>"pulong<%0>"    
  2933.  
  2934.  
  2935.  If a type  is not  specified,  it  defaults  to  "int".    When  calling  a
  2936.  function, the parameter may be an  expression  such  as  'x  +  5'  if  the
  2937.  parameter type is not a 'pointer type'  ("int", "short"  "long",  "ushort",
  2938.  "ulong",  "string").    If  the  parameter  type  is  a    'pointer  type'
  2939.  ("pstring", "pint", "pshort", "plong", "pushort", "pulong")  the  parameter
  2940.  must be a single identifier.   AUTOPILOT  will  handle  all  the  necessary
  2941.  conversions.
  2942.  
  2943.  "string" and "pstring" both correspond to the C data type of char *.    Use
  2944.  "string" if the parameter is not modified (or if you are not interested  in
  2945.  retaining the value of modified data).  By using "string" you  can  specify
  2946.  the parameter as an expression such as "Hello World"    or  (x+5)/7.    Use
  2947.  "pstring" if the function will modify the data and if you  want  to  access
  2948.  this modified data.  When you use "pstring" the parameter in  the  function
  2949.  call must be a single identifier.
  2950.  
  2951.  When using "string" or "pstring" as a parameter type  you  MUST  make  sure
  2952.  that data returned in  the  string  does  not  exceed  the  length  of  the
  2953.  original string.  You can use the STR_REPLICATE Function  to  'allocate'  a
  2954.  string of the desired length.
  2955.  
  2956.  Note that 'int' is 32 bits  for  OS/2.    More  information  on  Rules  For
  2957.  Specifying Functions are listed  in  the  section,  Calling  DLL  Functions
  2958.  Directly in the chapter, AUTOPILOT Statements By Category.
  2959.  
  2960.  
  2961. Return Data Types:
  2962.  
  2963.  All functions are assumed to return a value.   By  default  this  value  is
  2964.  assumed to be an 'int' (see Parameter Data Types above).  If  the  function
  2965.  returns something other than  an  'int',  the  RETURN_TYPE  Clause  in  the
  2966.  DECLARE FUNCTION Statement should be specified with the  appropriate  type.
  2967.  A function may return a value in any of the  formats  listed  in  Parameter
  2968.  Data Types except for 'string' and 'pstring'.   If  a  function  wishes  to
  2969.  return string data it must do so as a function parameter not  as  a  return
  2970.  value.
  2971.  
  2972. See Also:
  2973.  
  2974.   WINDOW HANDLE
  2975.  
  2976.  
  2977.  
  2978.  
  2979.                           12.26 DESELECT Statement                          
  2980.  
  2981.  
  2982. Purpose:
  2983.  
  2984. The DESELECT Statement allows the script to deselect a line  from  within  a
  2985. LIST_BOX or COMBINATION_BOX dialog control.
  2986.  
  2987. Format:
  2988.  
  2989.   ┌──────────────────────────────────────────────────────────────────────┐
  2990.   │ DESELECT  {LIST_BOX(id)      }                                       │
  2991.   │           {COMBINATION_BOX(id) }                                     │
  2992.   │          [ IN DIALOG_WINDOW (winid) ]                                │
  2993.   │           LINE <num>                                                 │
  2994.   └──────────────────────────────────────────────────────────────────────┘
  2995.  
  2996. Remarks:
  2997.  
  2998. If an  item  is  DESELECTed,  it's  number  WILL  NOT  be  returned  by  the
  2999. SELECTED_LINE Function.
  3000.  
  3001. See Also:
  3002.  
  3003.   SELECT
  3004.   IS_CHECKED
  3005.  
  3006.  
  3007.  
  3008.  
  3009.                           12.27 DESTROY Statement                           
  3010.  
  3011.  
  3012. Purpose:
  3013.  
  3014. Destroys AUTOPILOT window objects, session monitors and DDE_LINK objects.
  3015.  
  3016. Format:
  3017.  
  3018.   ┌──────────────────────────────────────────────────────────────────────┐
  3019.   │ DESTROY DIALOG_WINDOW <window-number>                                │
  3020.   │                                                                      │
  3021.   │ DESTROY TEXT_WINDOW <window-number>                                  │
  3022.   │                                                                      │
  3023.   │ DESTROY SESSION_MONITOR (monitorid)                                  │
  3024.   │                                                                      │
  3025.   │ DESTROY DDE_LINK(linkid )                                            │
  3026.   └──────────────────────────────────────────────────────────────────────┘
  3027.  
  3028.  
  3029. Remarks:
  3030.  
  3031. Removes a dialog, text window, session monitor, or  DDE_LINK  created  using
  3032. the CREATE Statement.
  3033.  
  3034.  
  3035. Example:
  3036.  
  3037.     destroy DIALOG_WINDOW my_window
  3038.     DESTROY DDE_LINK(1)
  3039.  
  3040.  
  3041. See Also:
  3042.  
  3043.   CREATE
  3044.  
  3045.  
  3046.  
  3047.  
  3048.                             12.28 DIAL Statement                            
  3049.  
  3050.  
  3051. Purpose:
  3052.  
  3053. Dials a TalkThru asynchronous session.
  3054.  
  3055. Format:
  3056.  
  3057.   ┌──────────────────────────────────────────────────────────────────────┐
  3058.   │ DIAL                                                                 │
  3059.   └──────────────────────────────────────────────────────────────────────┘
  3060.  
  3061.  
  3062. Remarks:
  3063.  
  3064. The  DIAL  Statement  causes  TalkThru  to  perform  the  dial  sequence  as
  3065. specified in the Phone Book Entry  Definition  (these  can  be  modified  by
  3066. requesting Connection from any Settings pull down menu). If Connection  Type
  3067. is specified as Auto, DIAL dials the number  that  is  specified.    If  the
  3068. Connection Type is Direct, only a physical connection is made with  no  dial
  3069. sequence.
  3070.  
  3071. This statement is valid only during asynch communications and, as  with  all
  3072. communications activities, a valid CONNECT must have been previously issued.
  3073.  
  3074. Example:
  3075.  
  3076.     DIAL
  3077.  
  3078. This example would dial the telephone number specified  in  the  Phone  Book
  3079. Entry Definition.
  3080.  
  3081. See Also:
  3082.  
  3083.   HANG_UP
  3084.  
  3085.  
  3086.  
  3087.  
  3088.                             12.29 DIM Statement                             
  3089.  
  3090.  
  3091. Purpose:
  3092.  
  3093. Defines an array.
  3094.  
  3095. Format:
  3096.  
  3097.   ┌──────────────────────────────────────────────────────────────────────┐
  3098.   │ DIM identifier (n1 [,n2 [,n3]]) [= <value>,<value> ...]              │
  3099.   └──────────────────────────────────────────────────────────────────────┘
  3100.  
  3101. Remarks:
  3102.  
  3103. The DIM Statement is used to define an array variable. The n parameters  are
  3104. used to define the maximum  size  of  the  array,  with  as  many  as  three
  3105. dimensions supported.
  3106.  
  3107. Array  elements,  by  default,  are  initialized  to  zero.  Arrays  may  be
  3108. redimensioned by executing another DIM Statement. This also  resets  all  of
  3109. the array elements to zero.
  3110.  
  3111. The array may be initialized to values other  than  zero  by  specifying  an
  3112. equal sign followed by  a  group  of  comma  separated  values.  This  first
  3113. element in the array is set equal to the first value, the second element  is
  3114. set to the second value and so on. If the list of  values  ends  before  all
  3115. the array elements are initialized, the remaining elements are set to  zero.
  3116. When multi-dimensional arrays are initialized, the  rightmost  subscript  is
  3117. varied fastest.
  3118.  
  3119. Examples:
  3120.  
  3121.     DIM A(10)
  3122.     SET i = 1
  3123.     WHILE i <= 10
  3124.       SET A(i) = "Element "&i
  3125.       SET i = i + 1
  3126.     END_WHILE
  3127.  
  3128.     DIM array(3)
  3129.     SET array(1) = "ELEMENT 1"
  3130.     SET array(2) = "ELEMENT 2"
  3131.     SET array(3) = "ELEMENT 3"
  3132.     DIM array(3) = "ELEMENT 1" , "ELEMENT 2" , "ELEMENT 3"
  3133.  
  3134. See Also:
  3135.  
  3136.   SET
  3137.  
  3138.  
  3139.  
  3140.  
  3141.                             12.30 DIR Statement                             
  3142.  
  3143.  
  3144. Purpose:
  3145.  
  3146. Provides access to directory information.
  3147.  
  3148. Format:
  3149.  
  3150.   ┌──────────────────────────────────────────────────────────────────────┐
  3151.   │ DIR {<fname>} [INTO <identifier>] [USING<attr>]                      │
  3152.   │     { NEXT  }            [AS <format>]                               │
  3153.   └──────────────────────────────────────────────────────────────────────┘
  3154.  
  3155.  
  3156. Remarks:
  3157.  
  3158. The DIR Statement searches a directory for entries that match the  specified
  3159. file name or file name pattern.  The  DIR  <fname>  format  is  the  minimum
  3160. required to execute DIR. By  specifying  a  fully  qualified  <fname>,  this
  3161. simple form  can  be  used  to  determine  a  files  existence  (by  testing
  3162. return_code - 0 = File Not Found 1  =  File  Found)  without  identifying  a
  3163. target identifier to contain the name.
  3164.  
  3165. If the INTO <identifier> clause is used in the first execution of DIR,  then
  3166. successive executions of the DIR NEXT  format  locates  additional  matching
  3167. files. The number of matching files returned can be determined by  examining
  3168. RETURN_CODE.
  3169.  
  3170. Examples:
  3171.  
  3172. <fname>is a string specifying the drive,  path,  and  name  of  the  desired
  3173. file. The drive  and  path  can  be  omitted,  in  which  case  the  current
  3174. directory will be searched. The "*" and  "?"  characters  may  be  used  for
  3175. pattern matching in the name portion.
  3176.  
  3177. INTO <identifier> refers to the variable that will receive  the  results  of
  3178. the search. If it is not an array, it will be set to the file  name  of  the
  3179. matching file.
  3180.  
  3181. In the example
  3182.  
  3183.     DIR "C:\*.*" INTO table
  3184.  
  3185. the identifier table would be set to  the  first  matching  file  name,  say
  3186. "COMMAND.COM". If the next statement was:
  3187.  
  3188.     DIR NEXT INTO table
  3189.  
  3190. the identifier table would be set to the next matching  file  which  may  be
  3191. "CONFIG.SYS".
  3192.  
  3193. If the identifier is a 1 dimensional array, each element in  the  array  (up
  3194. to the number of matches) will be set to the file name of a  matching  file.
  3195. In the example
  3196.  
  3197.     DIM table(3) DIR "C:\*.*" INTO table
  3198.  
  3199. the array table might be set as follows:
  3200.  
  3201.     table(1) = COMMAND.COM
  3202.     table(2) = CONFIG.SYS
  3203.     table(3) = AUTOEXEC.BAT
  3204.  
  3205. If the next statement was
  3206.  
  3207.     DIR NEXT INTO table
  3208.  
  3209. the array table would be filled with the next 3 matching files.
  3210.  
  3211. If the identifier is a 2 dimensional array, additional file  information  is
  3212. returned. For the purposes of this explanation, the second dimension of  the
  3213. array is referred to as the number of columns.  To  obtain  more  than  just
  3214. file name information, the array would be defined as:
  3215.  
  3216.   DIM table(x,y)
  3217.  
  3218. where:  <x> is the maximum number of file names to be obtained and  y  is  a
  3219. number from 1 to 4 indicating the number of columns of information desired.
  3220.  
  3221. The columns returned by the DIR Statement are set  as  follows  (up  to  the
  3222. number of columns requested):
  3223.  
  3224.     Column 1 -- File Name
  3225.     Column 2 -- File Attribute
  3226.     Column 3 -- File Size
  3227.     Column 4 -- File Time
  3228.  
  3229. File Attribute refers to the type of file returned.  See  the  USING  option
  3230. specified below.
  3231.  
  3232. File Time is returned as a numeric value that represents the files DOS  date
  3233. and time stamp. It can  be  converted  to  a  string  by  the  STR_DATE  and
  3234. STR_TIME functions.
  3235.  
  3236. The USING attr argument specifies which file types are  to  be  included  in
  3237. the search. It is not valid in the DIR NEXT format. The attr is  an  integer
  3238. value with bits set as follows:
  3239.  
  3240.     Bit 1 -- Include Hidden Files
  3241.     Bit 2 -- Include System Files
  3242.     Bit 3 -- Find Only the Volume Label
  3243.     Bit 4 -- Include Directory Files
  3244.  
  3245. By default, the search will include only Normal Files (attr = 0).
  3246. The following example would return DIRECTORY entries.
  3247.  
  3248.     DIR "C:\*.*" INTO dirname USING ^h10
  3249.  
  3250. NOTE:
  3251.    The file TT_DIR.INC sets identifier names to the bit  settings  necessary
  3252.    for the DIR  Statement.  INCLUDing  TT_DIR.INC  will  greatly  facilitate
  3253.    effective  use  if  DIR.  TT_DIR.INC  can  be  found  in  the  directory
  3254.    identified  by  the  SCRIPT_DIRECTORY  parameter  in  the  TALKTHRU.DEF
  3255.    Customization File.
  3256.  
  3257. The AS <format> option may be used to specify alternate  directory  formats.
  3258. Normally,  the  DIR  Statement  returns  the  file  name  in  the  format
  3259. NNNNNNNN.EEE.  <format>  is  specified  as  an  integer  value,  each  value
  3260. representing a different format type. The  available  formats  can  best  be
  3261. presented  as  an  example.  Assume  the  DIR  Statement  found  the  files
  3262. TALKTHRU.BAT, 512 bytes created on 6-1-86 at 2:10 A.M.,  and  DOC.WP,  15800
  3263. bytes created on 12-15-86 at  12:25  P.M..  The  AS  <format>  option  would
  3264. operate as follows:
  3265.  
  3266.  
  3267.  position =>>           1         2         3     
  3268.                         0         0         0  
  3269.  <format>
  3270.    0           TALKTHRU.BAT
  3271.                DOC.WP
  3272.  
  3273.    1           TALKTHRU BAT
  3274.                DOC    WP
  3275.  
  3276.    2           TALKTHRU BAT    6-01-86     2:10a
  3277.                DOC      WP    12-15-86    12:25p
  3278.  
  3279.    3           TALKTHRU BAT     512    6-01-86  2:10a
  3280.                DOC      WP    15800   12-15-86  12:25p
  3281.  
  3282.   NOTE:
  3283.      AS 0 is the default format  and  is  used  if  the  AS  option  is  not
  3284.      specified. Format 2 is the same format  as  displayed  by  TalkThru  in
  3285.      file selection panels, and format 3 is the same format as displayed  by
  3286.      the DOS DIR command.
  3287.  
  3288. See Also:
  3289.  
  3290.   DIM
  3291.  
  3292.  
  3293.  
  3294.  
  3295.                           12.31 DISABLE Statement                           
  3296.  
  3297.  
  3298. Purpose:
  3299.  
  3300. The DISABLE statement allows the script to change  the  selectability  state
  3301. of a window, menu item, dialog item or session monitor.
  3302.  
  3303. Format:
  3304.  
  3305.   ┌──────────────────────────────────────────────────────────────────────┐
  3306.   │ DISABLE  {TEXT_WINDOW(winid)   }                                     │
  3307.   │          {DIALOG_WINDOW(winid)  }                                    │
  3308.   │                                                                      │
  3309.   │ DISABLE ACTION_BAR_MENU [ IN DIALOG_WINDOW (winid) ]                 │
  3310.   │                         [ IN TEXT_WINDOW(WINID)  ]                   │
  3311.   │                                                                      │
  3312.   │ DISABLE {PULLDOWN(id) } [ IN DIALOG_WINDOW(winid) ]                  │
  3313.   │         {CHOICE(id)   } [ IN TEXT_WINDOW(winid)   ]                  │
  3314.   │                                                                      │
  3315.   │ DISABLE {TEXT_FIELD(id)        }                                     │
  3316.   │         {ENTRY_FIELD(id)       }                                     │
  3317.   │         {PUSH_BUTTON(id)       }                                     │
  3318.   │         {RADIO_BUTTON(id)      }                                     │
  3319.   │         {CHECK_BOX(id)        }                                      │
  3320.   │         {LIST_BOX (id)         }                                     │
  3321.   │         {COMBINATION_BOX(id)    }                                    │
  3322.   │         {GROUP_BOX(id)        }                                      │
  3323.   │         {ICON_FIELD(id)        }                                     │
  3324.   │         {MULTILINE_ENTRY_FIELD(id) }                                 │
  3325.   │             [ IN DIALOG_WINDOW(winid) ]                              │
  3326.   │                                                                      │
  3327.   │ DISABLE SESSION_MONITOR(monitorid)                                   │
  3328.   │                                                                      │
  3329.   │ DISABLE TEXT_WATCH(id) [ IN SESSION_MONITOR(monitorid) ]             │
  3330.   │                                                                      │
  3331.   │ DISABLE HOST_KEY_WATCH(id)                                           │
  3332.   │             [ IN SESSION_MONITOR(monitorid) ]                        │
  3333.   └──────────────────────────────────────────────────────────────────────┘
  3334.  
  3335. Remarks:
  3336.  
  3337. When a dialog or text window item is DISABLEd,  it  cannot  by  selected  or
  3338. modified by the user. menu  items  and  dialog  controls  are  also  usually
  3339. displayed in halftone when DISABLEd.  For more information on text  windows,
  3340. refer to the Appendix, Migration From DOS.
  3341.  
  3342. When a session monitor is disabled, no  monitoring  occurs  and  no  actions
  3343. will be generated for any item within the monitor.
  3344.  
  3345. When a watch is disabled, no  monitoring  occurs  and  no  actions  will  be
  3346. generated for that specific item. Other monitoring (if any) still occurs.
  3347.  
  3348. If the IN SESSION_MONITOR clause  is  not  specified,  the  current  session
  3349. monitor will be used (the last  monitor  created  or  one  set  by  the  SET
  3350. CURRENT_MONITOR statement).
  3351.  
  3352. See Also:
  3353.  
  3354.   ENABLE 
  3355.   IS_DISABLED
  3356.  
  3357.  
  3358.  
  3359.  
  3360.                     12.32 DISABLE Statement (DDE Client)                    
  3361.  
  3362.  
  3363. Purpose:
  3364.  
  3365. Changes the state of a Client's DDE item from ENABLED to DISABLED.
  3366.  
  3367. Format:
  3368.  
  3369.   ┌──────────────────────────────────────────────────────────────────────┐
  3370.   │ Format 1:                                                            │
  3371.   │                                                                      │
  3372.   │  DISABLE HOT_LINK(id ) [ IN DDE_LINK(linkid) ]                       │
  3373.   │  DISABLE WARM_LINK(id ) [ IN DDE_LINK(linkid) ]                      │
  3374.   │                                                                      │
  3375.   │ Format 2:                                                            │
  3376.   │                                                                      │
  3377.   │  DISABLE TOPIC(id ) [ IN DDE_LINK(linkid) ]                          │
  3378.   │                                                                      │
  3379.   │ Format 3:                                                            │
  3380.   │                                                                      │
  3381.   │  DISABLE DDE_LINK(linkid)                                            │
  3382.   └──────────────────────────────────────────────────────────────────────┘
  3383.  
  3384. Remarks:
  3385.  
  3386. Format 1 changes the state of a HOT_LINK or WARM_LINK item to  DISABLED.  If
  3387. the TOPIC the link is associated with is  opened,  an  unadvise  transaction
  3388. will be generated for the link item.  When the value of the item changes  an
  3389. ACTION will NOT be triggered and the  associated  variable  (HOT_LINK  items
  3390. only) will NOT be updated.
  3391.  
  3392. Format 2 changes the state of a TOPIC to DISABLED. If the TOPIC the link  is
  3393. associated with is opened, an unadvise transaction  will  be  generated  for
  3394. all active HOT_LINK and  WARM_LINK  link  items.  In  addition,  a  DISABLED
  3395. TOPIC's ACTION routine will not receive any ACTIONs.
  3396.  
  3397. Format  3  changes  the  state  of  a  DDE_LINK  to  DISABLED.  An  unadvise
  3398. transaction will be generated for all active HOT_LINK  and  WARM_LINK  items
  3399. that  are  associated  with  an  opened  TOPIC.  In  addition,  a  DISABLED
  3400. DDE_LINK's ACTION routine will not receive any ACTIONS.
  3401.  
  3402. Examples:
  3403.  
  3404.   DISABLE HOT_LINK(2) IN DDE_LINK(1)
  3405.  
  3406.   DISABLE TOPIC(1)
  3407.  
  3408.   DISABLE DDE_LINK(1)
  3409.  
  3410.  
  3411.  
  3412.  
  3413.                     12.33 DISABLE Statement (DDE Server)                    
  3414.  
  3415.  
  3416. Purpose:
  3417.  
  3418. Changes the state of a Server's DDE item from ENABLED to DISABLED.
  3419.  
  3420. Format:
  3421.  
  3422.   ┌──────────────────────────────────────────────────────────────────────┐
  3423.   │ Format 1:                                                            │
  3424.   │                                                                      │
  3425.   │  DISABLE EXPORT_ITEM(id) [ IN DDE_LINK(linkid) ]                     │
  3426.   │                                                                      │
  3427.   │ Format 2:                                                            │
  3428.   │                                                                      │
  3429.   │  DISABLE EXPORT_COMMAND(id) [ IN DDE_LINK(linkid) ]                  │
  3430.   │                                                                      │
  3431.   │ Format 3:                                                            │
  3432.   │                                                                      │
  3433.   │  DISABLE TOPIC(id) [ IN DDE_LINK(linkid) ]                           │
  3434.   │                                                                      │
  3435.   │ Format 4:                                                            │
  3436.   │                                                                      │
  3437.   │  DISABLE DDE_LINK(linkid)                                            │
  3438.   └──────────────────────────────────────────────────────────────────────┘
  3439.  
  3440. Remarks:
  3441.  
  3442. Format 1 changes the state of an EXPORT_ITEM entry to DISABLED.  The  server
  3443. script will NOT accept  poke,  request,  and  advise  transactions  for  the
  3444. EXPORT_ITEM entry.
  3445.  
  3446. Format 2 changes the state of  an  EXPORT_COMMAND  entry  to  DISABLED.  The
  3447. server script will NOT accept execute transactions  for  the  EXPORT_COMMAND
  3448. entry.
  3449.  
  3450. Format 3 changes the state of a TOPIC to DISABLED. The  server  script  will
  3451. NOT accept poke, request, and advise transactions for  any  of  the  TOPIC's
  3452. EXPORT_ITEM  entries  or  execute  transaction  for  any  of  the  TOPIC's
  3453. EXPORT_COMMAND  entries.  In  addition,  clients  will  be  NOT  allowed  to
  3454. initiate a conversation with the TOPIC.
  3455.  
  3456. Format 4 changes the state of a DDE_LINK  to  DISABLED.  The  server  script
  3457. will NOT accept poke, request,  and  advise  transactions  for  all  of  the
  3458. DDE_LINK's EXPORT_ITEM entries  or  execute  transactions  for  any  of  the
  3459. DDE_LINK's EXPORT_COMMAND entries. In addition, clients will NOT be  allowed
  3460. to initiate  conversations with all of the DDE_LINKs TOPICs.
  3461.  
  3462. Examples:
  3463.  
  3464.   DISABLE EXPORT_ITEM(2) IN DDE_LINK(1)
  3465.  
  3466.   DISABLE TOPIC(1)
  3467.   DISABLE DDE_LINK(1)
  3468.  
  3469.  
  3470.  
  3471.  
  3472.                          12.34 DISCONNECT Statement                         
  3473.  
  3474.  
  3475. Purpose:
  3476.  
  3477. Drops the logical connection between  the  script  and  the  last  connected
  3478. session.
  3479.  
  3480. Format:
  3481.  
  3482.   ┌──────────────────────────────────────────────────────────────────────┐
  3483.   │ DISCONNECT                                                           │
  3484.   └──────────────────────────────────────────────────────────────────────┘
  3485.  
  3486. Remarks:
  3487.  
  3488. The DISCONNECT Statement will disconnect the  currently  CONNECT'ed  session
  3489. from the script. AUTOPILOT will automatically DISCONNECT  upon  exiting.  It
  3490. is not necessary to DISCONNECT when switching from one  session  to  another
  3491. while within the script.
  3492.  
  3493. DISCONNECT DOES NOT hang up the phone on a TalkThru  session,  nor  does  it
  3494. make the session GO AWAY.
  3495.  
  3496. See Also:
  3497.  
  3498.   CONNECT
  3499.  
  3500.  
  3501.  
  3502.  
  3503.                           12.35 DISK_INFO Function                          
  3504.  
  3505.  
  3506. Purpose:
  3507.  
  3508. To return various disk related information.
  3509.  
  3510. Format:
  3511.  
  3512.   ┌──────────────────────────────────────────────────────────────────────┐
  3513.   │ DISK_INFO(<drive>,<request>)                                         │
  3514.   └──────────────────────────────────────────────────────────────────────┘
  3515.  
  3516. Remarks:
  3517.  
  3518. <drive>
  3519.       a single character indicating the letter of the drive  to  be  checked
  3520.       (i.e. A, B, C, D)
  3521.  
  3522. <request>
  3523.       the number 1 or the number 2 indicating  the  request  type  from  the
  3524.       table below:
  3525.  
  3526.          request  Returns
  3527.                   0 - <drive> is ready
  3528.            1      1 - <drive> letter is invalid
  3529.                   2 - <drive> is not ready
  3530.            2      the amount of free disk space on <drive> in bytes
  3531.  
  3532. See Also:
  3533.  
  3534.   DIR
  3535.   STR_CURRDIR
  3536.   STR_CURRDISK
  3537.  
  3538.  
  3539.  
  3540.  
  3541.                            12.36 ENABLE Statement                           
  3542.  
  3543.  
  3544. Purpose:
  3545.  
  3546. The ENABLE Statement allows the script to change the selectability state  of
  3547. a window, menu item, dialog item, or session monitor.
  3548.  
  3549. Format:
  3550.  
  3551.   ┌──────────────────────────────────────────────────────────────────────┐
  3552.   │ ENABLE {TEXT_WINDOW}(winid)  }                                       │
  3553.   │        {DIALOG_WINDOW(winid) }                                       │
  3554.   │                                                                      │
  3555.   │ ENABLE ACTION_BAR_MENU [ IN DIALOG_WINDOW(winid) ]                   │
  3556.   │                        [ IN  TEXT_WINDOW (winid)  ]                  │
  3557.   │                                                                      │
  3558.   │ ENABLE {PULLDOWN (id) } [ IN DIALOG_WINDOW (winid) ]                 │
  3559.   │        {CHOICE(id)   }  [ IN TEXT_WINDOW(winid)  ]                   │
  3560.   │                                                                      │
  3561.   │ ENABLE {TEXT_FIELD(id)        }                                      │
  3562.   │        {ENTRY_FIELD(id)       }                                      │
  3563.   │        {PUSH_BUTTON(id)       }                                      │
  3564.   │        {RADIO_BUTTON(id)      }                                      │
  3565.   │        {CHECK_BOX(id)         }                                      │
  3566.   │        {LIST_BOX(id)          }                                      │
  3567.   │        {COMBINATION_BOX(id)   }                                      │
  3568.   │        {GROUP_BOX(id)         }                                      │
  3569.   │        {ICON_FIELD(id)         }                                     │
  3570.   │        {MULTILINE_ENTRY_FIELD(id)  }                                 │
  3571.   │          [ IN DIALOG_WINDOW(winid) ]                                 │
  3572.   │                                                                      │
  3573.   │ ENABLE SESSION_MONITOR(monitorid)                                    │
  3574.   │                                                                      │
  3575.   │ ENABLE TEXT_WATCH(id) [ IN SESSION_MONITOR(monitorid) ]              │
  3576.   │                                                                      │
  3577.   │ ENABLE  HOST_KEY_WATCH(id)                                           │
  3578.   │            [ IN SESSION_MONITOR(monitorid) ]                         │
  3579.   └──────────────────────────────────────────────────────────────────────┘
  3580.  
  3581.  
  3582. Remarks:
  3583.  
  3584. When a dialog or text window  item  is  ENABLEd,  it  can  by  selected  and
  3585. modified by the user. For more information on text  windows,  refer  to  the
  3586. Appendix, Migration From DOS.
  3587.  
  3588. If the IN SESSION_MONITOR clause  is  not  specified,  the  current  session
  3589. monitor will be used (the last  monitor  created  or  one  set  by  the  SET
  3590. CURRENT_MONITOR statement).
  3591.  
  3592. See Also:
  3593.  
  3594.   DISABLE
  3595.   IS_DISABLED
  3596.  
  3597.  
  3598.  
  3599.  
  3600.                     12.37 ENABLE Statement (DDE Client)                     
  3601.  
  3602.  
  3603. Purpose:
  3604.  
  3605. Changes the state of a Client's DDE item from DISABLED to ENABLED.
  3606.  
  3607. Format:
  3608.  
  3609.   ┌──────────────────────────────────────────────────────────────────────┐
  3610.   │ Format 1:                                                            │
  3611.   │                                                                      │
  3612.   │  ENABLE HOT_LINK(id)   [ IN DDE_LINK(linkid) ]                       │
  3613.   │  ENABLE WARM_LINK(id ) [ IN DDE_LINK(linkid) ]                       │
  3614.   │                                                                      │
  3615.   │ Format 2:                                                            │
  3616.   │                                                                      │
  3617.   │  ENABLE TOPIC(id) [ IN DDE_LINK(linkid) ]                            │
  3618.   │                                                                      │
  3619.   │ Format 3:                                                            │
  3620.   │                                                                      │
  3621.   │  ENABLE DDE_LINK(link id)                                            │
  3622.   └──────────────────────────────────────────────────────────────────────┘
  3623.  
  3624.  
  3625. Remarks:
  3626.  
  3627. Format 1 changes the state of a HOT_LINK or WARM_LINK item  to  ENABLED.  If
  3628. the TOPIC the link is associated with  is  opened  and  enabled,  an  advise
  3629. transaction will be generated for the link item.   When  the  value  of  the
  3630. item changes, an ACTION  will  be  triggered  and  the  associated  variable
  3631. (HOT_LINK items only) will be updated.
  3632.  
  3633. Format 2 changes the state of a TOPIC to ENABLED. If the TOPIC the  link  is
  3634. associated with is opened, an advise transaction will be generated  for  all
  3635. enabled HOT_LINK and WARM_LINK link items.  When the value of the link  item
  3636. changes, an ACTION will be triggered and the associated  variable  (HOT_LINK
  3637. items only) will be updated.  An  ENABLED  TOPIC  also  allows  the  TOPIC's
  3638. ACTION routine to receive appropriate ACTIONs.
  3639.  
  3640. Format 3 changes the state of a DDE_LINK to ENABLED. An  advise  transaction
  3641. will be generated for all enabled HOT_LINK  and  WARM_LINK  items  that  are
  3642. associated with an opened enabled TOPIC. An  ENABLED  DDE_LINK  also  allows
  3643. the DDE_LINK's ACTION routine to receive appropriate ACTIONs.
  3644.  
  3645.  
  3646. Examples:
  3647.  
  3648.   ENABLE HOT_LINK(2) IN DDE_LINK(1)
  3649.  
  3650.   ENABLE TOPIC(1)
  3651.  
  3652.   ENABLE DDE_LINK(1)
  3653.  
  3654.  
  3655.  
  3656.  
  3657.                     12.38 ENABLE Statement (DDE Server)                     
  3658.  
  3659.  
  3660. Purpose:
  3661.  
  3662. Changes the state of a Server's DDE item from DISABLED to ENABLED.
  3663.  
  3664. Format:
  3665.  
  3666.   ┌──────────────────────────────────────────────────────────────────────┐
  3667.   │ Format 1:                                                            │
  3668.   │                                                                      │
  3669.   │  ENABLE EXPORT_ITEM(id) [ IN DDE_LINK(linkid) ]                      │
  3670.   │                                                                      │
  3671.   │ Format 2:                                                            │
  3672.   │                                                                      │
  3673.   │  ENABLE EXPORT_COMMAND(id) [ IN DDE_LINK(linkid) ]                   │
  3674.   │                                                                      │
  3675.   │ Format 3:                                                            │
  3676.   │                                                                      │
  3677.   │  ENABLE TOPIC(id) [ IN DDE_LINK(linkid) ]                            │
  3678.   │                                                                      │
  3679.   │ Format 4:                                                            │
  3680.   │                                                                      │
  3681.   │  ENABLE DDE_LINK(linkid)                                             │
  3682.   └──────────────────────────────────────────────────────────────────────┘
  3683.  
  3684. Remarks:
  3685.  
  3686. Format 1 changes the state of an EXPORT_ITEM entry to ENABLED. If the  TOPIC
  3687. the link is associated with is opened and enabled, the  server  script  will
  3688. accept poke, request, and advise transactions for the EXPORT_ITEM entry.
  3689.  
  3690. Format 2 changes the state of an EXPORT_COMMAND entry  to  ENABLED.  If  the
  3691. TOPIC the link is associated with is opened and enabled, the  server  script
  3692. will accept execute transactions for the EXPORT_COMMAND entry.
  3693.  
  3694. Format 3 changes the state of a TOPIC to ENABLED.  The  server  script  will
  3695. accept poke, request,  and  advise  transactions  for  all  of  the  TOPIC's
  3696. enabled EXPORT_ITEM entries and execute transactions for all of the  TOPIC's
  3697. EXPORT_COMMAND entries. In addition, clients will be allowed to  initiate  a
  3698. conversation with the TOPIC.
  3699.  
  3700. Format 4 changes the state of a DDE_LINK to ENABLED. The server script  will
  3701. accept poke, request, and advise transactions  for  all  of  the  DDE_LINK's
  3702. enabled  EXPORT_ITEM  entries  and  execute  transactions  for  all  of  the
  3703. DDE_LINK's EXPORT_COMMAND entries. In addition, clients will be  allowed  to
  3704. initiate  conversations with all of the DDE_LINKs enabled TOPICs.
  3705.  
  3706. Examples:
  3707.  
  3708.   ENABLE EXPORT_ITEM(2) IN DDE_LINK(1)
  3709.  
  3710.   ENABLE TOPIC(1)
  3711.  
  3712.   ENABLE DDE_LINK(1)
  3713.  
  3714.  
  3715.  
  3716.  
  3717.                              12.39 EOF Function                             
  3718.  
  3719.  
  3720. Purpose:
  3721.  
  3722. Tests for an end of file condition.
  3723.  
  3724. Format:
  3725.  
  3726.   ┌──────────────────────────────────────────────────────────────────────┐
  3727.   │ EOF(<filenum>)                                                       │
  3728.   └──────────────────────────────────────────────────────────────────────┘
  3729.  
  3730. Remarks:
  3731.  
  3732. EOF returns 1 (true) if end of  file  has  been  reached  on  the  specified
  3733. <filenum>. A 0 (false) is returned if end of file has not been reached.
  3734.  
  3735. Examples:
  3736.  
  3737.     OPEN "anyfile.ext" FOR INPUT AS filenum
  3738.   loop:
  3739.     READ LINE filenum var
  3740.     IF EOF(filenum) GOTO end
  3741.     DISPLAY var
  3742.     GOTO loop
  3743.  
  3744. This example would read and display data from  "anyfile.ext"  until  end  of
  3745. file is reached.
  3746.  
  3747. See Also:
  3748.  
  3749.   CLOSE
  3750.   OPEN
  3751.   OPEN_FLAG
  3752.   READ
  3753.   WRITE
  3754.  
  3755.  
  3756.  
  3757.  
  3758.                             12.40 EXIT Statement                            
  3759.  
  3760.  
  3761. Purpose:
  3762.  
  3763. Terminates the running AUTOPILOT script.
  3764.  
  3765. Format:
  3766.  
  3767.   ┌──────────────────────────────────────────────────────────────────────┐
  3768.   │ EXIT [ABORT] [KEEP] [<retcode>]                                      │
  3769.   └──────────────────────────────────────────────────────────────────────┘
  3770.  
  3771. Remarks:
  3772.  
  3773. [ABORT]
  3774.       causes termination of all AUTOPILOT  processing  irrespective  of  the
  3775.       execution level depth.
  3776. [KEEP]
  3777.       may be used if performance dictates that it is  desirable  to  keep  a
  3778.       subroutine script resident in memory so as to eliminate  the  need  to
  3779.       reload it when it is next invoked.
  3780.  
  3781. <retcode>
  3782.       is a number that represents the return code of the script. It will  be
  3783.       passed to the next highest level script as a return code. This  return
  3784.       code may be examined within the calling script  via  RETURN_CODE  [see
  3785.       the IF Statement] or by CMD  files.  If  the  return  code  is  to  be
  3786.       examined from within a BAT file it is recommended that  the  range  be
  3787.       limited to 1 to 255.
  3788.  
  3789. The keywords ABORT and KEEP  may  appear  in  any  order.  If  <retcode>  is
  3790. specified it must be the last parameter.
  3791.  
  3792. Examples:
  3793.  
  3794.     EXIT
  3795.  
  3796.     EXIT ABORT rcode
  3797.  
  3798.     EXIT KEEP
  3799.  
  3800. The first example would exit the current script, returning  to  the  calling
  3801. script or program. A default return code of 0 would be returned.
  3802.  
  3803. The second example would exit the script program and return to  the  calling
  3804. program regardless of the level of  the  current  script.  The  return  code
  3805. would be set to rcode.
  3806.  
  3807. The third example would exit the script program and  the  terminal  emulator
  3808. that called it (if any). The return code would be set to 255.
  3809.  
  3810. The last example would exit the script subroutine but keep it in memory.
  3811.  
  3812. See Also:
  3813.  
  3814.   RETURN_CODE
  3815.  
  3816.  
  3817.  
  3818.  
  3819.                          12.41 FILE_ACCESS Function                         
  3820.  
  3821.  
  3822. Purpose:
  3823.  
  3824. To determine whether the specified  file  can  be  accessed  in  a  specific
  3825. "mode".
  3826.  
  3827. Format:
  3828.  
  3829.   ┌──────────────────────────────────────────────────────────────────────┐
  3830.   │ FILE_ACCESS(<filespec>,<mode>)                                       │
  3831.   └──────────────────────────────────────────────────────────────────────┘
  3832.  
  3833. Remarks:
  3834.  
  3835. <filespec>
  3836.      the fully qualified file specification of the file  you  wish  to  have
  3837.      checked
  3838.  
  3839. <mode>
  3840.      the mode in which you  wish  to  access  the  file.    <mode>  must  be
  3841.      specified as a number with one of the following values:
  3842.  
  3843.        0 - check for existence only
  3844.        2 - check for write permission
  3845.        4 - check for read permission
  3846.        6 - check for read and write permission
  3847.  
  3848. The value returned will be one of the following:
  3849.  
  3850.     0 - file exists and is accessible in the given mode
  3851.     1 - file does not exist
  3852.     2 - file exists but is not accessible in the given mode
  3853.  
  3854. Examples:
  3855.  
  3856.     set t_status = FILE_ACCESS("C:\AUTOEXEC.BAT",2)
  3857.     if t_status = 0 goto do_open
  3858.  
  3859. This example would test whether an AUTOEXEC.BAT file was  available  on  the
  3860. "C" drive and whether it can be written to.  If the response is 0, a  branch
  3861. will occur to process the file.
  3862.  
  3863. See Also:
  3864.  
  3865.   CLOSE
  3866.   DIR
  3867.   DISK_INFO
  3868.   OPEN
  3869.  
  3870.  
  3871.  
  3872.  
  3873.                     12.42 FILE_TRANSFER_STATUS Function                     
  3874.  
  3875.  
  3876. Purpose:
  3877.  
  3878. The  FILE_TRANSFER_STATUS  Function  is  used  with  the  SEND_FILE  and
  3879. RECEIVE_FILE Functions to determine the current status of the file  transfer
  3880. operation when NOWAIT was specified.
  3881.  
  3882. Format:
  3883.  
  3884.   ┌──────────────────────────────────────────────────────────────────────┐
  3885.   │ FILE_TRANSFER_STATUS                                                 │
  3886.   └──────────────────────────────────────────────────────────────────────┘
  3887.  
  3888. Remarks:
  3889.  
  3890. When  the  NOWAIT  option  is  used  on  the  SEND_FILE  and  RECEIVE_FILE
  3891. Statements, the AUTOPILOT program is allowed to  continue  processing  while
  3892. the file transfer operation proceeds.    The  FILE_TRANSFER_STATUS  Function
  3893. allows the AUTOPILOT program to obtain the  ongoing  status  of  these  file
  3894. transfers. The following values are returned by FILE_TRANSFER_STATUS:
  3895.  
  3896.   0  - Successful completion
  3897.   1  - Not connected
  3898.   2  - The file could not be opened.
  3899.   3  - Syntax error within <file-transfer-command> or <file-transfer-type>
  3900.   4  - File transfer failed
  3901.   5  - File transfer was canceled
  3902.   10 - File transfer is running
  3903.   11 - File transfer waiting to start
  3904.  
  3905. Examples:
  3906.  
  3907. Send a file to another PC using XMODEM and continue processing.
  3908.  
  3909.   SEND_FILE NOWAIT "data.prn" USING "XMODEM"
  3910.     ... continue processing ...
  3911.  
  3912.   WAIT UNTIL FILE_TRANSFER_STATUS < 10   ; Wait until its done
  3913.  
  3914.  
  3915.  
  3916.  
  3917.                             12.43 FOUND Function                            
  3918.  
  3919.  
  3920. Purpose:
  3921.  
  3922. Returns the result of the last LOOK or WAIT Statement.
  3923.  
  3924. Format:
  3925.  
  3926.   ┌──────────────────────────────────────────────────────────────────────┐
  3927.   │ FOUND                                                                │
  3928.   └──────────────────────────────────────────────────────────────────────┘
  3929.  
  3930. Remarks:
  3931.  
  3932. The result of the last  LOOK  Statement  is  returned  as  a  number.  FOUND
  3933. returns TRUE (not zero) if  the  LOOK  Statement  was  successful.  A  FALSE
  3934. (zero) is returned if the LOOK Statement was unsuccessful.
  3935.  
  3936. If the last LOOK Statement had multiple search strings, FOUND will return  a
  3937. value that indicates which search string was found.
  3938.  
  3939. Examples:
  3940.  
  3941.     LOOK FOR "VM READ"
  3942.     IF FOUND GOTO ready
  3943.  
  3944. In the above example if "VM READ" was  found  on  the  screen,  FOUND  would
  3945. return a 1 (true) and the GOTO ready statement would be executed.
  3946.  
  3947.     LOOK FOR "CP READ", "VM READ"
  3948.     IF FOUND = 0 GOTO not_fnd
  3949.     IF FOUND = 1 GOTO cp_rd
  3950.     IF FOUND = 2 GOTO vm_rd
  3951.  
  3952. In the above example, if "VM READ" was on the screen, FOUND would  return  a
  3953. 2 and if "CP READ" was on the screen FOUND would return a 1.
  3954.  
  3955. See Also:
  3956.  
  3957.   GOTO DEPENDING_ON
  3958.   LOOK FOR
  3959.   WAIT FOR
  3960.  
  3961.  
  3962.  
  3963.  
  3964.                         12.44 FOUND_COLUMN Function                         
  3965.  
  3966.  
  3967. Purpose:
  3968.  
  3969. This function will return the screen column position of the last  successful
  3970. WAIT FOR or LOOK FOR Statement.
  3971.  
  3972. Format:
  3973.  
  3974.   ┌──────────────────────────────────────────────────────────────────────┐
  3975.   │ FOUND_COLUMN                                                         │
  3976.   └──────────────────────────────────────────────────────────────────────┘
  3977.  
  3978. Remarks:
  3979.  
  3980. The result of using this function will give you the exact  column  of  where
  3981. the LOOK FOR or WAIT FOR Statement was found.
  3982.  
  3983. Example:
  3984.  
  3985.     LOOK FOR "CP READ"
  3986.     SET c = FOUND_COLUMN
  3987.  
  3988. In this example if "CP READ" was found in its normal position  on  a  VM/CMS
  3989. screen, FOUND_COLUMN would set "c" to 64.
  3990.  
  3991. See Also:
  3992.  
  3993.   FOUND
  3994.   FOUND_ROW
  3995.   LOOK FOR
  3996.   WAIT FOR
  3997.  
  3998.  
  3999.  
  4000.  
  4001.                           12.45 FOUND_ROW Function                          
  4002.  
  4003.  
  4004. Purpose:
  4005.  
  4006. This function will return the screen row position  of  the  last  successful
  4007. WAIT FOR or LOOK FOR Statement.
  4008.  
  4009. Format:
  4010.  
  4011.   ┌──────────────────────────────────────────────────────────────────────┐
  4012.   │ FOUND_ROW                                                            │
  4013.   └──────────────────────────────────────────────────────────────────────┘
  4014.  
  4015. Remarks:
  4016.  
  4017. The result of using this function will give you the row where the  LOOK  FOR
  4018. or WAIT FOR Statement was found.
  4019.  
  4020. Example:
  4021.  
  4022.     LOOK FOR "CP READ"
  4023.     SET r = FOUND_ROW
  4024.  
  4025. In this example if "CP READ" was found on the screen,  FOUND_ROW  would  set
  4026. "r" to 24.
  4027.  
  4028. See Also:
  4029.  
  4030.   FOUND
  4031.   FOUND_COLUMN
  4032.   LOOK FOR
  4033.   WAIT FOR
  4034.  
  4035.  
  4036.  
  4037.  
  4038.                            12.46 GLOBAL Statement                           
  4039.  
  4040.  
  4041. Purpose:
  4042.  
  4043. The GLOBAL Statement allows variables in one script  to  be  accessed  by  a
  4044. subroutine script.
  4045.  
  4046. Format:
  4047.  
  4048.   ┌──────────────────────────────────────────────────────────────────────┐
  4049.   │ GLOBAL identifier-1 [= value] [, identifier-2 [= value] ...]         │
  4050.   └──────────────────────────────────────────────────────────────────────┘
  4051.  
  4052. Remarks:
  4053.  
  4054. By declaring an identifier  GLOBAL  in  a  script,  the  identifier  may  be
  4055. accessed and modified by any subroutine scripts.
  4056.  
  4057. Examples:
  4058.  
  4059. The following statements are equivalent:
  4060.  
  4061.     GLOBAL X, Y
  4062.     SET X = "DOG"
  4063.     SET Y = "CAT"
  4064.     GLOBAL X = "DOG" , Y = "CAT"
  4065.  
  4066. In the above example, the variables X and Y may be examined and modified  by
  4067. a subroutine script.
  4068.  
  4069. See Also:
  4070.  
  4071.   SET
  4072.  
  4073.  
  4074.  
  4075.  
  4076.                             12.47 GOTO Statement                            
  4077.  
  4078.  
  4079. Purpose:
  4080.  
  4081. The GOTO Statement causes execution control to skip to an  identified  point
  4082. in the AUTOPILOT text.
  4083.  
  4084. Format:
  4085.  
  4086.   ┌──────────────────────────────────────────────────────────────────────┐
  4087.   │ GOTO <label>                                                         │
  4088.   │                                                                      │
  4089.   │ GOTO DEPENDING ON <number> <label-1>                                 │
  4090.   │                        [ , <Label-2>   .  .  .                       │
  4091.   │                        [ , <label-n> ] ]                             │
  4092.   └──────────────────────────────────────────────────────────────────────┘
  4093.  
  4094.  
  4095. Remarks:
  4096.  
  4097. The GOTO Statement causes the script to continue  at  the  first  executable
  4098. statement encountered after <label>.
  4099.  
  4100. For the GOTO with a DEPENDING_ON clause, a branch  is  taken  to  the  label
  4101. based on the value of the number. If <number> equals "1" then  a  branch  to
  4102. <label-1> is taken. If <number> equals "2" then a  branch  to  <label-2>  is
  4103. taken, etc. If there is no corresponding <label> for the value  of  <number>
  4104. or if <number> is equal to "0", then the next statement after  the  GOTO  is
  4105. executed.
  4106.  
  4107. Examples:
  4108.  
  4109. Format 1:
  4110.  
  4111.   GOTO loop
  4112.  
  4113. Format 2:
  4114.  
  4115.   get_option:
  4116.     PROMPT "Enter Option ==>>" opt(1) AT 1,1
  4117.     GOTO DEPENDING_ON opt opt1_rtn, opt2_rtn, opt3_rtn
  4118.     BEEP
  4119.     DISPLAY "Invalid Option"
  4120.     GOTO get_option
  4121.  
  4122. See Also:
  4123.  
  4124.   PERFORM
  4125.   IF
  4126.  
  4127.  
  4128.  
  4129.  
  4130.                           12.48 HANG_UP Statement                           
  4131.  
  4132.  
  4133. Purpose:
  4134.  
  4135. The HANG_UP Statement causes the telephone connection to be disconnected.
  4136.  
  4137. Format:
  4138.  
  4139.   ┌──────────────────────────────────────────────────────────────────────┐
  4140.   │ HANG_UP                                                              │
  4141.   └──────────────────────────────────────────────────────────────────────┘
  4142.  
  4143. Remarks:
  4144.  
  4145. The HANG_UP Statement is valid only during asynchronous communications.
  4146.  
  4147. When the HANG_UP Statement is executed, the  HANG_UP  string  definition  in
  4148. the Terminal definition file (if any) will be sent  and  the  call  will  be
  4149. disconnected. The current emulation definition is still in effect and  other
  4150. host connectivity statements (SEND, WAIT, etc.) may be used.
  4151.  
  4152. See Also:
  4153.  
  4154.   DIAL
  4155.  
  4156.  
  4157.  
  4158.  
  4159.                             12.49 HIDE Statement                            
  4160.  
  4161.  
  4162. Purpose:
  4163.  
  4164. The HIDE Statement can be used to change the visibility state  of  a  window
  4165. or dialog control to invisible.
  4166.  
  4167. Format:
  4168.  
  4169.   ┌──────────────────────────────────────────────────────────────────────┐
  4170.   │ HIDE {TEXT_WINDOW(winid)   }                                         │
  4171.   │      {DIALOG_WINDOW(winid) }                                         │
  4172.   │                                                                      │
  4173.   │ HIDE {TEXT_FIELD(id)        }                                        │
  4174.   │      {ENTRY_FIELD(id)       }                                        │
  4175.   │      {PUSH_BUTTON(id)       }                                        │
  4176.   │      {RADIO_BUTTON(id)      }                                        │
  4177.   │      {CHECK_BOX(id)         }                                        │
  4178.   │      {LIST_BOX(id)          }                                        │
  4179.   │      {COMBINATION_BOX(id)   }                                        │
  4180.   │      {GROUP_BOX(id)         }                                        │
  4181.   │      {ICON_FIELD(id)        }                                        │
  4182.   │      {MULTILINE_ENTRY_FIELD(id)  }                                   │
  4183.   │       [ IN DIALOG_WINDOW(winid) ]                                    │
  4184.   └──────────────────────────────────────────────────────────────────────┘
  4185.  
  4186. Remarks:
  4187.  
  4188. The  HIDE  Statement  is  the  reverse  of  the  SHOW  Statement.  For  more
  4189. information on text windows, refer to the Appendix, Migration From DOS.
  4190.  
  4191. See Also:
  4192.  
  4193.   CREATE DIALOG_WINDOW
  4194.   CREATE TEXT_WINDOW
  4195.   SHOW
  4196.  
  4197.  
  4198.  
  4199.  
  4200.                      12.50 HOST_CURSOR_COLUMN Function                      
  4201.  
  4202.  
  4203. Purpose:
  4204.  
  4205. This function returns the host cursor column position.
  4206.  
  4207. Format:
  4208.  
  4209.   ┌──────────────────────────────────────────────────────────────────────┐
  4210.   │ HOST_CURSOR_COLUMN                                                   │
  4211.   └──────────────────────────────────────────────────────────────────────┘
  4212.  
  4213. Remarks:
  4214.  
  4215. This function will return the current column position of the Host cursor.
  4216.  
  4217. See Also:
  4218.  
  4219.   HOST_CURSOR_ROW
  4220.  
  4221. See Also:
  4222.  
  4223.   SCREEN
  4224.  
  4225.  
  4226.  
  4227.  
  4228.                        12.51 HOST_CURSOR_ROW Function                       
  4229.  
  4230.  
  4231. Purpose:
  4232.  
  4233. This function returns the host cursor row position.
  4234.  
  4235. Format:
  4236.  
  4237.   ┌──────────────────────────────────────────────────────────────────────┐
  4238.   │ HOST_CURSOR_ROW                                                      │
  4239.   └──────────────────────────────────────────────────────────────────────┘
  4240.  
  4241. Remarks:
  4242.  
  4243. This function will return the current row position of the Host cursor.
  4244.  
  4245. See Also:
  4246.  
  4247.   HOST_CURSOR_COLUMN
  4248.   SCREEN
  4249.  
  4250.  
  4251.  
  4252.  
  4253.                              12.52 IF Statement                             
  4254.  
  4255.  
  4256. Purpose:
  4257.  
  4258. The IF Statement makes a decision regarding script execution  based  on  the
  4259. results of a comparison.
  4260.  
  4261. Formats:
  4262.  
  4263.   ┌──────────────────────────────────────────────────────────────────────┐
  4264.   │ IF <condition> <statement-1> [ELSE<statement-2>]                     │
  4265.   │                                                                      │
  4266.   │ IF<condition>                                                        │
  4267.   │  BEGIN                                                               │
  4268.   │   <statement-1> ....<statement-2>...                                 │
  4269.   │   <statement-n>                                                      │
  4270.   │  END                                                                 │
  4271.   │ [ ELSE                                                               │
  4272.   │  BEGIN                                                               │
  4273.   │   <statement-3>  . . . <statement-4>  . . .                          │
  4274.   │   <statement-m>                                                      │
  4275.   │  END ]                                                               │
  4276.   └──────────────────────────────────────────────────────────────────────┘
  4277.  
  4278. Remarks:
  4279.  
  4280. <statement>
  4281.         may be any AUTOPILOT Statement except another IF or WAIT Statement.
  4282.  
  4283. <condition>
  4284.         may be any valid AUTOPILOT condition test.
  4285.  
  4286. In format 1, if the condition is true <statement-1> is  executed.  If  there
  4287. is an ELSE clause, <statement-2> is skipped.  If  the  condition  is  false,
  4288. <statement-1> is skipped. If there  is  an  ELSE  clause,  <statement-2>  is
  4289. executed.
  4290.  
  4291. When using the ELSE clause and "compound" AUTOPILOT  statements, use  format
  4292. 2 of ELSE described below. If the simple format of ELSE is used, the  second
  4293. part of the "compound" statement will be executed  whether  or  not  the  IF
  4294. condition is true. Examples of compound statements within AUTOPILOT are:
  4295.  
  4296.  
  4297.     First Part           Second Part
  4298.     -----------------    -----------
  4299.     IF <condition>       <statement>
  4300.     WAIT FOR <string>    AFTER
  4301.  
  4302. If the string on the right side of a comparison is character and the  string
  4303. on the left is numeric, the string will be converted to numeric  before  the
  4304. comparison. If the string  cannot  be  converted  to  numeric  (it  contains
  4305. non-numeric characters), if will be converted to  the  number  0.  This  can
  4306. cause unexpected results.
  4307.  
  4308. Because of  the  problem  indicated  above,  format  2  is  the  recommended
  4309. approach. In  format  2,  if  the  condition  is  true,  <statement-1>  thru
  4310. <statement-n> is executed. If there is an ELSE  clause,  <statement-3>  thru
  4311. <statement-m> is skipped. If the  condition  is  false,  <statement-1>  thru
  4312. <statement-n> is skipped. If there is an  ELSE  clause,  <statement-2>  thru
  4313. <statement-m> is executed.
  4314. In format 2, if statements may be nested.
  4315.  
  4316. Examples:
  4317.  
  4318.     IF counter = 10 EXIT 4
  4319.     IF reply = "NO" GOTO dontdoit
  4320.  
  4321.     RUN SCRIPT "any.scr"
  4322.     IF RETURN_CODE = 17 SIGNAL TIMEOUT
  4323.     LOOK FOR any_string
  4324.     IF NOT FOUND GOTO anylabel
  4325.  
  4326.     IF NOT FOUND GOTO label1 ELSE GOTO label2
  4327.     IF X = 1 AND Y = 1
  4328.       BEGIN
  4329.         DISPLAY "Equal to 1"
  4330.         BEEP
  4331.         GOTO label1
  4332.       END
  4333.      ELSE GOTO label2
  4334.  
  4335. See Also:
  4336.  
  4337.   BEGIN
  4338.   END
  4339.   GOTO
  4340.   WHILE
  4341.  
  4342.  
  4343.  
  4344.  
  4345.                           12.53 INCLUDE Statement                           
  4346.  
  4347.  
  4348. Purpose:
  4349.  
  4350. This statement allows for the merging of script source statements.
  4351.  
  4352. Format:
  4353.  
  4354.   ┌──────────────────────────────────────────────────────────────────────┐
  4355.   │ INCLUDE "script_file_name"                                           │
  4356.   └──────────────────────────────────────────────────────────────────────┘
  4357.  
  4358. Remarks:
  4359.  
  4360. This statement is used to merge source statements from one script file  into
  4361. another script at the time it is loaded into memory.
  4362.  
  4363. Unless a fully qualified file specification is provided,  the  INCLUDE  File
  4364. must be present either:
  4365.  
  4366.   - in the same directory as the requesting script
  4367.  
  4368.   - in the  directory  pointed  to  by  the  SCRIPT_DIRECTORY  Customization
  4369.     Variable
  4370.  
  4371. See Also:
  4372.  
  4373.   RUN SCRIPT
  4374.  
  4375.  
  4376.  
  4377.  
  4378.                             12.54 INSTR Function                            
  4379.  
  4380.  
  4381. Purpose:
  4382.  
  4383. This function is used to search for  an  occurrence  of  one  string  within
  4384. another string.
  4385.  
  4386. Format:
  4387.  
  4388.   ┌──────────────────────────────────────────────────────────────────────┐
  4389.   │ INSTR(n,string-1,string-2)                                           │
  4390.   └──────────────────────────────────────────────────────────────────────┘
  4391.  
  4392. Remarks:
  4393.  
  4394. This statement will search for  the  first  occurrence  of  string-2  within
  4395. string-1 starting at offset n and returns the position at  which  the  match
  4396. is found. If no match is found, the function returns a 0.
  4397. A "wild card" search is performed in the same manner as  the  WAIT  FOR  and
  4398. LOOK FOR commands.
  4399.  
  4400. Examples:
  4401.  
  4402.     INSTR (1,"ABCDEFGHI", "DEF")
  4403.  
  4404.     INSTR (2,"DEFDEFDEF", "DEF")
  4405.     INSTR (1,"DEFDEFDEF", "ABC")
  4406.  
  4407. In the first example, the operation will return a code of 4. In  the  second
  4408. example, the operation will return a code of 4. In the  third  example,  the
  4409. operation will return a code of 0.
  4410.  
  4411. See Also:
  4412.  
  4413.   STR_MID
  4414.  
  4415.  
  4416.  
  4417.  
  4418.                          12.55 IS_CHECKED Function                          
  4419.  
  4420.  
  4421. Purpose:
  4422.  
  4423. The IS_CHECKED Function is used to determine the CHECKed state of  a  dialog
  4424. control or menu item.
  4425.  
  4426. Format:
  4427.  
  4428.   ┌──────────────────────────────────────────────────────────────────────┐
  4429.   │ IS_CHECKED( {RADIO_BUTTON(id) }                                      │
  4430.   │             {CHECK_BOX(id)   }                                       │
  4431.   │          [ IN DIALOG_WINDOW(winid) ] )                               │
  4432.   │                                                                      │
  4433.   │ IS_CHECKED( {CHOICE(id) } [ IN DIALOG_WINDOW(winid) ]                │
  4434.   │                           [ IN TEXT_WINDOW(winid)  ] )               │
  4435.   └──────────────────────────────────────────────────────────────────────┘
  4436.  
  4437.  
  4438. Remarks:
  4439.  
  4440. It returns 1 (TRUE) if the item is  CHECKed  or  0  (FALSE)  if  it  is  not
  4441. CHECKed. For more information  on  text  windows,  refer  to  the  Appendix,
  4442. Migration From DOS.
  4443.  
  4444.  
  4445. See Also:
  4446.  
  4447. CHECK
  4448. UNCHECK
  4449.  
  4450.  
  4451.  
  4452.  
  4453.                          12.56 IS_DISABLED Function                         
  4454.  
  4455.  
  4456. Purpose:
  4457.  
  4458. The IS_DISABLED Function is used to determine the selectability state  of  a
  4459. dialog or menu item.
  4460.  
  4461. Format:
  4462.  
  4463.   ┌──────────────────────────────────────────────────────────────────────┐
  4464.   │ IS_DISABLED( {TEXT_FIELD(id)             }                           │
  4465.   │              {ENTRY_FIELD(id)            }                           │
  4466.   │              {PUSH_BUTTON(id)            }                           │
  4467.   │              {RADIO_BUTTON(id)           }                           │
  4468.   │              {CHECK_BOX(id)              }                           │
  4469.   │              {LIST_BOX(id)               }                           │
  4470.   │              {COMBINATION_BOX(id)        }                           │
  4471.   │              {GROUP_BOX(id)              }                           │
  4472.   │              {ICON_FIELD(id)             }                           │
  4473.   │              {MULTILINE_ENTRY_FIELD(id)  }                           │
  4474.   │           [ IN DIALOG_WINDOW(winid) ]  )                             │
  4475.   │                                                                      │
  4476.   │                                                                      │
  4477.   │ IS_DISABLED( {CHOICE(id)  } [IN DIALOG_WINDOW(winid) ]               │
  4478.   │              {PULLDOWN(id)} [IN TEXT_WINDOW(winid)  ] )              │
  4479.   └──────────────────────────────────────────────────────────────────────┘
  4480.  
  4481. Remarks:
  4482.  
  4483. It returns 1 (TRUE) if the item is DISABLEd or 0 (FALSE) if it  is  ENABLEd.
  4484. For more information on text windows, refer to the Appendix, Migration  From
  4485. DOS.
  4486.  
  4487. See Also:
  4488.  
  4489.   DISABLE
  4490.   ENABLE
  4491.  
  4492.  
  4493.  
  4494.  
  4495.                             12.57 JUMP Statement                            
  4496.  
  4497.  
  4498. Purpose:
  4499.  
  4500. Directs subsequent script statements to interact with the specified  EHLLAPI
  4501. Session and makes that session the active window.
  4502.  
  4503. Format:
  4504.  
  4505.   ┌──────────────────────────────────────────────────────────────────────┐
  4506.   │ JUMP TO SESSION <session>                                            │
  4507.   └──────────────────────────────────────────────────────────────────────┘
  4508.  
  4509. Remarks:
  4510.  
  4511. <session>
  4512.       is a single letter EHLLAPI session-id or the 2 to 8 character  EHLLAPI
  4513.       session-name of the session to receive control
  4514.  
  4515. WARNING:
  4516.      In order for JUMP to function properly by specifying session-id  for  a
  4517.      TalkThru session, the  TalkThru  session  must  have  been  loaded  for
  4518.      EHLLAPI Support.  For more information on what this means  and  how  it
  4519.      is accomplished, refer  to  the  Chapter,  EHLLAPI  Support.    If  you
  4520.      specify the longer session-name, this restriction is not valid.
  4521.  
  4522. Remarks:
  4523.  
  4524. See description of CONNECT and JUMP Statements.
  4525.  
  4526.  
  4527. See Also:
  4528.  
  4529.   CONNECT
  4530.  
  4531.  
  4532.  
  4533.  
  4534.                              12.58 LEN Function                             
  4535.  
  4536.  
  4537. Purpose:
  4538.  
  4539. Returns the number of characters in a string.
  4540.  
  4541. Format:
  4542.  
  4543.   ┌──────────────────────────────────────────────────────────────────────┐
  4544.   │ LEN(<string>)                                                        │
  4545.   └──────────────────────────────────────────────────────────────────────┘
  4546.  
  4547. Remarks:
  4548.  
  4549. <string> is any string.
  4550.  
  4551. The number of characters in <string>, including blanks, is returned.
  4552.  
  4553. Example:
  4554.  
  4555.     SET a = LEN("ANY STRING")
  4556.  
  4557. This example would set a equal to the number 10.
  4558.  
  4559.  
  4560.  
  4561.  
  4562.                      12.59 LOCATE HOST_CURSOR Statement                     
  4563.  
  4564.  
  4565. Purpose:
  4566.  
  4567. Used to position the Host Cursor.
  4568.  
  4569. Format:
  4570.  
  4571.   ┌──────────────────────────────────────────────────────────────────────┐
  4572.   │ LOCATE HOST_CURSOR AT <row> <col>                                    │
  4573.   └──────────────────────────────────────────────────────────────────────┘
  4574.  
  4575. Remarks:
  4576.  
  4577. This will position the host cursor through a series of Up,  Down,  Left  and
  4578. Right cursor movement keys to the position on the Host Screen  indicated  by
  4579. the <row> and <col> coordinates.
  4580.  
  4581.  
  4582.  
  4583.  
  4584.                             12.60 LOOK Statement                            
  4585.  
  4586.  
  4587. Purpose:
  4588.  
  4589. Searches the host screen for the specified string pattern.
  4590.  
  4591. Format:
  4592.  
  4593.   ┌──────────────────────────────────────────────────────────────────────┐
  4594.   │ LOOK FOR <string>  [AT <row> <col>]                                  │
  4595.   │       [,<string-n> [AT <row> <col>] ]                                │
  4596.   │                                                                      │
  4597.   │ LOOK FOR <string>   [FROM <row> <col> ]                              │
  4598.   │                     [TO <row> <col> ]                                │
  4599.   │       [,<string-n>  [FROM <row> <col> ]                              │
  4600.   │                     [TO <row> <col> ] ]                              │
  4601.   └──────────────────────────────────────────────────────────────────────┘
  4602.  
  4603.  
  4604. Remarks:
  4605.  
  4606. <string> is a search pattern specified in a character string form where:
  4607.    
  4608.    ?  matches any character
  4609.    s* matches zero or more occurrences of character (s)
  4610.    s+ matches 1 or more occurrence of character (s)
  4611.  
  4612. A leading backslash may be used to match one of the  special  characters  ?,
  4613. *, or +.
  4614.  
  4615. The AT clause limits the  search  area  to  the  specified  row  and  column
  4616. values. The FROM and TO clauses allow you to specify a row/ column range  to
  4617. be searched. If neither the AT or FROM/TO clauses are specified, the  entire
  4618. screen will be searched.
  4619.  
  4620. If multiple strings are supplied, the screen will be searched  for  a  match
  4621. with each of the strings in  the  order  specified.  LOOK  will  return  the
  4622. number of the string found in the FOUND Function. If the  first  string  was
  4623. found, the FOUND function would return a 1; if the third  string  was  found
  4624. the FOUND function would return a 3. If none of the strings were found,  the
  4625. FOUND function would return a 0.
  4626.  
  4627. This facility can be used in conjunction with the DEPENDING ON form of  GOTO
  4628. Statement to branch to any one of several routines based on the text  string
  4629. located. Specifying multiple text  strings  is  significantly  quicker  than
  4630. utilizing multiple LOOK Statements.
  4631.  
  4632. Examples:
  4633.  
  4634. Format 1:
  4635.  
  4636.     LOOK FOR "TalkThru"
  4637.  
  4638.     LOOK FOR "LOGOFF AT ??:??:??"
  4639.     LOOK FOR "VM READ" AT 24, 60
  4640.     IF FOUND goto any_label
  4641.  
  4642. Format 2:
  4643.  
  4644.     LOOK FOR "VM/CMS ONLINE" ,
  4645.     "CP READ"
  4646.     "LOGOFF AT"
  4647.  
  4648.     IF FOUND = 0 GOTO fnd_error
  4649.     GOTO DEPENDING_ON FOUND fnd_logo,
  4650.                             fnd_cpread,
  4651.                             fnd_logoff
  4652.  
  4653. In this example, the value of FOUND is set to the  corresponding  occurrence
  4654. of the string which was found.
  4655.  
  4656. See Also:
  4657.  
  4658.   FOUND
  4659.   FOUND_COLUMN
  4660.   FOUND_ROW
  4661.   WAIT FOR
  4662.  
  4663.  
  4664.  
  4665.  
  4666.                          12.61 MESSAGE_BOX Function                         
  4667.  
  4668.  
  4669. Purpose:
  4670.  
  4671. The MESSAGE_BOX Function displays a standard OS/2  message  box,  waits  for
  4672. user response and returns the selected button.
  4673.  
  4674. Format:
  4675.  
  4676.   ┌──────────────────────────────────────────────────────────────────────┐
  4677.   │ MESSAGE_BOX( <title> ,                                               │
  4678.   │              <message ,                                              │
  4679.   │              <buttons-type> ,                                        │
  4680.   │              <dflt-button> ,                                         │
  4681.   │              <icon-type )                                            │
  4682.   └──────────────────────────────────────────────────────────────────────┘
  4683.  
  4684. Remarks:
  4685.  
  4686. <title>
  4687.  Message-box window title. Title is automatically centered.
  4688.  
  4689. <message>
  4690.  The text of the message to be displayed in the message-box window. Text  is
  4691.  automatically word-wrapped. A CR or LF may be imbedded in the text (use  ^M
  4692.  or ^J) to force line breaks.
  4693.  
  4694. <buttons-type>
  4695.  a number that indicates what type of buttons should  be  displayed  in  the
  4696.  message-box window. Values may be:
  4697.  
  4698.     1 - OK pushbutton
  4699.     2 - OK and CANCEL pushbuttons
  4700.     3 - YES and NO pushbuttons
  4701.     4 - YES, NO and CANCEL pushbuttons
  4702.     5 - ENTER pushbutton
  4703.     6 - ENTER and CANCEL pushbuttons
  4704.     7 - CANCEL pushbutton
  4705.     8 - RETRY and CANCEL pushbuttons
  4706.     9 - ABORT, RETRY and IGNORE pushbuttons
  4707.  
  4708. <dflt-button>
  4709.  a number which indicates which button should be the default.  May  be  1,2,
  4710.  or 3 (for first, second, or third button).
  4711.  
  4712. <icon-type>
  4713.  a number that indicates which of the standard icons should be displayed  in
  4714.  the message box. Values may be:
  4715.  
  4716.     0 - No icon
  4717.     1 - Query icon (question mark)
  4718.     2 - Warning icon (exclamation mark)
  4719.     3 - Information icon (upside down exclamation mark)
  4720.     4 - Error icon (Stop sign)
  4721.  
  4722. The function returns a number that indicates which button was pressed.   The
  4723. values are:
  4724.  
  4725.     0 - CANCEL
  4726.     1 - OK
  4727.     2 - ENTER
  4728.     3 - YES
  4729.     4 - NO
  4730.     5 - ABORT
  4731.     6 - RETRY
  4732.     7 - IGNORE
  4733.  
  4734.  
  4735.  
  4736.  
  4737.               12.62 MINIMIZE, MAXIMIZE, and RESTORE Statements              
  4738.  
  4739.  
  4740. Purpose:
  4741.  
  4742. These Statements execute the specified function against  a  text  window  or
  4743. dialog.
  4744.  
  4745. Format:
  4746.  
  4747.   ┌──────────────────────────────────────────────────────────────────────┐
  4748.   │ MINIMIZE  {TEXT_WINDOW(winid)  }                                     │
  4749.   │           {DIALOG_WINDOW(winid) }                                    │
  4750.   │                                                                      │
  4751.   │ MAXIMIZE {TEXT_WINDOW(winid)  }                                      │
  4752.   │          {DIALOG_WINDOW(winid) }                                     │
  4753.   │                                                                      │
  4754.   │ RESTORE {TEXT_WINDOW (winid)  }                                      │
  4755.   │         {DIALOG_WINDOW(winid) }                                      │
  4756.   └──────────────────────────────────────────────────────────────────────┘
  4757.  
  4758. Remarks:
  4759.  
  4760. For more information on text windows, refer to the Appendix, Migration  From
  4761. DOS.
  4762.  
  4763. See Also:
  4764.  
  4765.   CREATE TEXT_WINDOW
  4766.   CREATE DIALOG_WINDOW
  4767.  
  4768.  
  4769.  
  4770.  
  4771.                        12.63 NUMBER_OF_LINES Function                       
  4772.  
  4773.  
  4774. Purpose:
  4775.  
  4776. The NUMBER_OF_LINES Function returns the  number  of  lines  in  LIST_BOXes,
  4777. COMBINATION_BOXes and MULTILINE_ENTRY_FIELDs.
  4778.  
  4779. Format:
  4780.  
  4781.   ┌──────────────────────────────────────────────────────────────────────┐
  4782.   │ NUMBER_OF_LINES ( {LIST_BOX(id)              }                       │
  4783.   │                   {COMBINATION_BOX(id)       }                       │
  4784.   │                   {MULTILINE_ENTRY_FIELD(id) }                       │
  4785.   │              [ IN DIALOG_WINDOW (winid) ]  )                         │
  4786.   └──────────────────────────────────────────────────────────────────────┘
  4787.  
  4788. Remarks:
  4789.  
  4790. See Also:
  4791.  
  4792.   ADD TO
  4793.   SELECTED_LINE
  4794.   SET
  4795.   TEXT_OF
  4796.  
  4797.  
  4798.  
  4799.  
  4800.                              12.64 ON Statement                             
  4801.  
  4802.  
  4803. Purpose:
  4804.  
  4805. The ON Statement provides event trapping for timeout conditions on the  WAIT
  4806. FOR Statement.
  4807.  
  4808. Format:
  4809.  
  4810.   ┌──────────────────────────────────────────────────────────────────────┐
  4811.   │ ON { TIMEOUT } { <label> }                                           │
  4812.   │                                                                      │
  4813.   │ ON { TIMEOUT  } { RESET }                                            │
  4814.   └──────────────────────────────────────────────────────────────────────┘
  4815.  
  4816. Remarks:
  4817.  
  4818. When the first format of the ON Statement is executed, <label> will  receive
  4819. control if a WAIT FOR Statement has been issued without the AFTER  <timeval>
  4820. clause  and  the  SET  MAXWAIT  <timeval>  has  been  exceeded.  The  RESUME
  4821. Statement may be used to return from the trapping routine.  See  the  RESUME
  4822. Statement.
  4823.  
  4824. Format 2 may be used to RESET or  clear  the  TIMEOUT  trap.  If  a  TIMEOUT
  4825. occurs, the script will be canceled with an appropriate message.
  4826.  
  4827. Examples:
  4828.  
  4829.     set maxwait = 30 seconds
  4830.     on timeout timeout_rtn
  4831.  
  4832.     wait for "CP READ"
  4833.  
  4834. timeout_rtn:
  4835.     display "A Timeout Condition Has Occurred - Terminating With Error"
  4836.     prompt
  4837.     exit -1
  4838.  
  4839. See Also:
  4840.  
  4841.   MAXWAIT
  4842.  
  4843.  
  4844.  
  4845.  
  4846.                             12.65 OPEN Statement                            
  4847.  
  4848.  
  4849. Purpose:
  4850.  
  4851. Allows I/O to a file or device, activates a dialog or  text  window  created
  4852. using the CREATE Statement or activates a session monitor created using  the
  4853. CREATE SESSION_MONITOR Statement.
  4854.  
  4855. Format:
  4856.  
  4857.   ┌──────────────────────────────────────────────────────────────────────┐
  4858.   │ OPEN <filespec> FOR {OUTPUT        } AS <filenum>                    │
  4859.   │                     {INPUT         }                                 │
  4860.   │                     {APPEND        }                                 │
  4861.   │                     {INPUT OUTPUT  }                                 │
  4862.   │                     {INPUT APPEND  }                                 │
  4863.   │                                                                      │
  4864.   │ OPEN TEXT_WINDOW <window_number>                                     │
  4865.   │                                                                      │
  4866.   │ OPEN DIALOG_WINDOW <window_number>                                   │
  4867.   │                                                                      │
  4868.   │ OPEN SESSION_MONITOR <monitorid>                                     │
  4869.   └──────────────────────────────────────────────────────────────────────┘
  4870.  
  4871. Remarks:
  4872.  
  4873. <filespec>
  4874.       is a string value containing a valid OS/2 file specification.
  4875.  
  4876.  OUTPUT
  4877.          specifies sequential output mode.
  4878.  INPUT
  4879.          specifies sequential input mode.
  4880.  APPEND
  4881.          specifies sequential output mode where all subsequent  writes  will
  4882.          be at the end of file.
  4883.  INPUT OUTPUT
  4884.          opens file for both reading and writing; creates the file first  if
  4885.          it does not exist.
  4886.  INPUT APPEND
  4887.          opens the file for both  reading  and  writing;  creates  the  file
  4888.          first if it does not exist.
  4889.  
  4890. <filenum>
  4891.       is a number whose value is between  1  and  8.  0  is  also  valid  if
  4892.       <filenum> is an identifier. This number is associated  with  the  file
  4893.       for as long as it is open. It is used by other statements to refer  to
  4894.       the file. If <filenum> is an identifier and equal  to  zero,  it  will
  4895.       assigned the next valid file number.
  4896.  
  4897. The default directory for all files OPENed  is  the  one  specified  by  the
  4898. DATA_DIRECTORY parameter in the  TALKTHRU.DEF  Customization  File.  If  the
  4899. file cannot be opened, an error will occur and the script will be canceled.
  4900.  
  4901. <window_number>
  4902.         is the real number or identifier used in the CREATE  TEXT_WINDOW  or
  4903.         CREATE DIALOG_WINDOW  Statement.    For  more  information  on  text
  4904.         windows refer to the Appendix, Migration From DOS.
  4905.  
  4906. monitorid
  4907.      must  be  the  id  of  a  session  monitor  object  created  by  CREATE
  4908.      SESSION_MONITOR.  A session monitor is not active until it is opened.
  4909.  
  4910. Example (File Open):
  4911.  
  4912.     OPEN "inpfile.ext" FOR INPUT AS infile
  4913.     IF NOT OPEN_FLAG(infile) GOTO not_open
  4914.     OPEN "outfile.ext" FOR OUTPUT as outfile
  4915.   loop:
  4916.     READ LINE infile var
  4917.     IF EOF(infile) GOTO end
  4918.     WRITE LINE outfile var
  4919.     GOTO loop
  4920.             .
  4921.   end:
  4922.     CLOSE infile
  4923.     CLOSE outfile
  4924.  
  4925. This  example  would  copy  the  text  file  "inpfile.ext"  to  the  file
  4926. "outfile.ext". Note that it  is  not  necessary  to  initialize  infile  and
  4927. outfile because all identifiers are automatically initialized  to  zero  and
  4928. the open statement would then assign the next valid file number.
  4929.  
  4930. Example (window Open):
  4931.  
  4932.     set my_window = 0
  4933.     create TEXT_WINDOW my_window
  4934.       .
  4935.       .
  4936.       .
  4937.     end_create
  4938.  
  4939.     open TEXT_WINDOW my_window
  4940.  
  4941.  
  4942. Example (dialog Open):
  4943.  
  4944.     set my_dialog = 0
  4945.     create DIALOG_WINDOW my_dialog
  4946.       .
  4947.       .
  4948.       .
  4949.     end_create
  4950.  
  4951.     open DIALOG_WINDOW my_dialog
  4952.  
  4953. See Also:
  4954.  
  4955.   CLOSE
  4956.   EOF
  4957.   OPEN_FLAG
  4958.   READ
  4959.   WRITE
  4960.   CREATE_TEXT_WINDOW
  4961.   CREATE_DIALOG_WINDOW
  4962.   DESTROY
  4963.  
  4964.  
  4965.  
  4966.  
  4967.                      12.66 OPEN Statement (DDE Client)                      
  4968.  
  4969.  
  4970. Purpose:
  4971.  
  4972. Initiates a conversation with a DDE server.
  4973.  
  4974. Format:
  4975.  
  4976.   ┌──────────────────────────────────────────────────────────────────────┐
  4977.   │ Format 1:                                                            │
  4978.   │                                                                      │
  4979.   │  OPEN TOPIC(id) [ IN DDE_LINK(linkid) ]                              │
  4980.   │                                                                      │
  4981.   │ Format 2:                                                            │
  4982.   │                                                                      │
  4983.   │  OPEN DDE_LINK(linkid)                                               │
  4984.   └──────────────────────────────────────────────────────────────────────┘
  4985.  
  4986. Remarks:
  4987.  
  4988. This statement initiates a conversation with a DDE server for the  specified
  4989. TOPIC (format 1) or for all TOPICs in a DDE_LINK definition (format  2).  If
  4990. a  conversation  was  successfully  started  on  the  desired  topic(s),
  4991. RETURN_CODE is set to 0, otherwise it is set to 1. A  particular  topic  can
  4992. also be tested to see if it is open by using the IS_OPENED function.
  4993.  
  4994. The IN DDE_LINK clause in required only if there is more than  one  DDE_LINK
  4995. defined and it is not the current default.
  4996.  
  4997. Examples:
  4998.  
  4999.   OPEN TOPIC(1)
  5000.   OPEN TOPIC(1) IN DDE_LINK(2)
  5001.   OPEN DDE_LINK(1)
  5002.  
  5003.  
  5004.  
  5005.  
  5006.                      12.67 OPEN Statement (DDE Server)                      
  5007.  
  5008.  
  5009. Purpose:
  5010.  
  5011. Prepares an AUTOPILOT script to act a DDE server.
  5012.  
  5013. Format:
  5014.  
  5015.   ┌──────────────────────────────────────────────────────────────────────┐
  5016.   │ OPEN DDE_LINK(linkid)                                                │
  5017.   └──────────────────────────────────────────────────────────────────────┘
  5018.  
  5019. Remarks:
  5020.  
  5021. This statement  prepares  the  script  to  act  as  a  DDE  server  for  the
  5022. 'Application'  and  'Topics'  defined  in  the  specified  DDE_LINK.  No
  5023. conversations are started -- the server waits for a  client  to  initiate  a
  5024. conversation.
  5025.  
  5026. When a client initiates a conversation with the server, the  ACTION  routine
  5027. defined in the TOPIC clause  receives  control.    If  there  is  no  ACTION
  5028. routine in the TOPIC clause the DDE_LINK ACTION routine  (if  any)  receives
  5029. control.
  5030.  
  5031. Examples:
  5032.  
  5033.   OPEN DDE_LINK(serverid)
  5034.  
  5035.  
  5036.  
  5037.  
  5038.                           12.68 OPEN_FLAG Function                          
  5039.  
  5040.  
  5041. Purpose:
  5042.  
  5043. Test to see if a specified file is open.
  5044.  
  5045. Format:
  5046.  
  5047.   ┌──────────────────────────────────────────────────────────────────────┐
  5048.   │ OPEN_FLAG (<filenum>)                                                │
  5049.   └──────────────────────────────────────────────────────────────────────┘
  5050.  
  5051. Remarks:
  5052.  
  5053. Tests to see if a specified file is open. If it is, it returns a "1"  (TRUE)
  5054. or if it is closed, it returns a "0" (FALSE).
  5055.  
  5056. Example:
  5057.  
  5058.     OPEN <filename> for input as 1
  5059.     IF OPEN_FLAG(1) = 0
  5060.       BEGIN
  5061.         DISPLAY "File cannot be opened"
  5062.         EXIT ABORT
  5063.       END
  5064.  
  5065. See Also:
  5066.  
  5067.   CLOSE
  5068.   EOF
  5069.   OPEN
  5070.  
  5071.  
  5072.  
  5073.  
  5074.                           12.69 PERFORM Statement                           
  5075.  
  5076.  
  5077. Purpose:
  5078.  
  5079. The PERFORM Statement transfers control to the specified subroutine  in  the
  5080. AUTOPILOT text.
  5081.  
  5082. Format:
  5083.  
  5084.   ┌──────────────────────────────────────────────────────────────────────┐
  5085.   │ PERFORM <label>                                                      │
  5086.   │                                                                      │
  5087.   │ PERFORMDEPENDING_ON <number> <label-1>,                              │
  5088.   │                              <label-2>,                              │
  5089.   │                                  .                                   │
  5090.   │                                  .                                   │
  5091.   │                                  .                                   │
  5092.   │                              <label-n>                               │
  5093.   └──────────────────────────────────────────────────────────────────────┘
  5094.  
  5095. Remarks:
  5096.  
  5097. The PERFORM Statement causes the script to continue at the first  executable
  5098. statement encountered after <label>. When a RETURN Statement is  encountered
  5099. control will be returned  to  the  next  sequential  instruction  after  the
  5100. PERFORM Statement.
  5101.  
  5102. Format 2 allows a branch to be taken to the label based on the value of  the
  5103. number. If <number> equals "1" then a  branch  to  <label-1>  is  taken.  If
  5104. <number> equals "2" then a branch to <label-2> is taken, etc.  If  there  is
  5105. no corresponding <label> for the next value of <number> or  if  <number>  is
  5106. equal to "0", then the next statement after the PERFORM is executed.
  5107.  
  5108. Examples:
  5109.  
  5110. Format 1:
  5111.  
  5112.     PERFORM cleanup:
  5113.  
  5114. Format 2:
  5115.  
  5116.   get_option:
  5117.     PROMPT "Enter Option ==>>" opt(1) AT 1, 1
  5118.     PERFORM DEPENDING_ON opt opt1_rtn, opt2_rtn, opt3_rtn
  5119.     BEEP
  5120.     DISPLAY "Invalid Option"
  5121.     GOTO get_option
  5122.  
  5123. See Also:
  5124.  
  5125.   RETURN
  5126.  
  5127.  
  5128.  
  5129.  
  5130.                             12.70 QUIET Function                            
  5131.  
  5132.  
  5133. Purpose:
  5134.  
  5135. The QUIET function will determine if changes took place on the  host  during
  5136. the specified time frame.
  5137.  
  5138. Format:
  5139.  
  5140.   ┌──────────────────────────────────────────────────────────────────────┐
  5141.   │ QUIET (<timeval>)                                                    │
  5142.   └──────────────────────────────────────────────────────────────────────┘
  5143.  
  5144. Remarks:
  5145.  
  5146.                                   [ SECONDS  ]
  5147.             (<timeval> = <number> [ MINUTES  ] )
  5148.                                   [ HOURS    ]
  5149.  
  5150. This function will determine if  changes  took  place  on  the  host  screen
  5151. during a specified time period. This statement will return a "1"  (TRUE)  if
  5152. no changes took place, and a "0" (FALSE) if a change took place.
  5153.  
  5154. A change is defined in an asynchronous environment as any  characters  being
  5155. received from the host. In a 3270 environment a change  is  defined  as  any
  5156. change on the host screen or if the status is not ready (X SYSTEM, etc.).
  5157.  
  5158. When a change occurs, the function returns immediately with a value  of  "0"
  5159. (false). Otherwise it will wait up to  the  specified  amount  of  time  and
  5160. return with a value of "1" (true).
  5161.  
  5162. Examples:
  5163.  
  5164.     WAIT UNTIL QUIET(10 SECONDS)
  5165.         AFTER 60 SECONDS GOTO error_exit
  5166.  
  5167.     WAIT UNTIL NOT QUIET(5 SECONDS)
  5168.  
  5169. See Also:
  5170.  
  5171.   WAIT UNTIL
  5172.  
  5173.  
  5174.  
  5175.  
  5176.                             12.71 READ Statement                            
  5177.  
  5178.  
  5179. Purpose:
  5180.  
  5181. Reads data from a file and assigns them to script variables.
  5182.  
  5183. Format:
  5184.  
  5185.   ┌──────────────────────────────────────────────────────────────────────┐
  5186.   │      [ {CSV   } ]                                                    │
  5187.   │ READ [ {LINE  } ] <filenum> <identifier-1>                           │
  5188.   │      [ {BUFFER} ]    [ FOR <maxsize> ]                               │
  5189.   │                      [ AT <offset> [,<origin> ] ]                    │
  5190.   │                                                                      │
  5191.   │                          [, <identifier-2>                           │
  5192.   │                      [ FOR <maxsize> ]                               │
  5193.   │                      [ AT <offset> [,<origin  ] ]                    │
  5194.   │                          [,  . . . ]                                 │
  5195.   └──────────────────────────────────────────────────────────────────────┘
  5196.  
  5197. Remarks:
  5198.  
  5199. CSV
  5200.        an keyword indicating that the data contains Comma  Separated  Values
  5201.        and multiple values may occur per file record (this is the default)
  5202. LINE
  5203.        a keyword indicating that the individual  records  in  the  file  are
  5204.        separated by carriage returns
  5205. BUFFER
  5206.        a keyword indicating that the data is to be read randomly
  5207.  
  5208. <filenum>
  5209.        is the number used when the file was opened.
  5210.  
  5211. <identifier-n>
  5212.        is the name of a variable that will have a data item assigned to it.
  5213.  
  5214. FOR <maxsize>
  5215.        limits the amount of data that can be read into an identifier.   Used
  5216.        mainly with READ BUFFER.
  5217.  
  5218. AT <offset> <origin>
  5219.           specifies a new position for the "read pointer"
  5220.  
  5221.  
  5222. If identifier is the name of an array and  the  file  has  been  opened  for
  5223. input, then the file is read into the array. For example, if the array  were
  5224. defined as:
  5225.  
  5226.     DIM records(20)
  5227.  
  5228. and the following read command was issued:
  5229.  
  5230.     READ LINE in_file records
  5231.  
  5232. the first 20 records of in_file will be read into the array  records.  Also,
  5233. the keyword identifier return_code will be set  to  the  number  of  records
  5234. read. Subsequent reads of in_file will read the next  20  records  into  the
  5235. array records until EOF is reached.
  5236.  
  5237. NOTE:
  5238.     Reading records into an array is significantly faster than reading  them
  5239.     a record at a time.
  5240.  
  5241. If nothing is specified or if the CSV keyword is specified, the  data  items
  5242. are assumed to be comma separated. In this  format,  leading  spaces,  tabs,
  5243. carriage returns, and line feeds are ignored. The first  character  that  is
  5244. not a space, tab, carriage return, or line feed is assumed to be  the  start
  5245. of the data item. If this first character is  a  quotation  mark,  the  data
  5246. item will consist of all characters between the  first  quotation  mark  and
  5247. the last. If the data item contains a quotation  mark  as  a  character,  it
  5248. must appear as  two  quotation  marks  (just  like  string  constants  in  a
  5249. script). If the first character of a string is not  a  quotation  mark,  the
  5250. data item is assumed to end when a comma, tab, space,  carriage  return,  or
  5251. line feed is encountered.
  5252.  
  5253. If the LINE keyword is specified, all characters are read until  a  carriage
  5254. return is encountered. The characters are  assigned  to  <identifier-1>.  It
  5255. then skips over the carriage return/line feed sequence. The next  READ  LINE
  5256. Statement would read all the characters up to the next carriage  return.  If
  5257. more than 1 identifier is used in a READ LINE  Statement,  each  1  line  of
  5258. characters will be assigned to each identifier.
  5259.  
  5260. If the BUFFER keyword is specified, a specific number of bytes may  be  read
  5261. from a file without regard to delimiters such as CRLF (as in READ  LINE)  or
  5262. commas (as in READ CSV).  READ BUFFER could also  be  used  to  read  binary
  5263. data since it ignores the hex 1A End-Of-File mark.  READ  BUFFER  and  write
  5264. BUFFER can also be used to save window images (see  the  PC_SCREEN  function
  5265. with the CHARATTR option).
  5266.  
  5267. The FOR <maxsize> clause is normally used with the  READ  BUFFER  Statement,
  5268. but can be used with READ CSV  and  READ  LINE  as  well.    If  it  is  not
  5269. specified (the normal case), the maximum size for data read is  set  to  the
  5270. maximum AUTOPILOT string size (4k).
  5271.  
  5272. If the end of file is reached, the identifiers are  set  to  a  NULL  string
  5273. (length of zero).
  5274.  
  5275. All READ types allow data to be accessed "randomly" (via the AT  clause)  so
  5276. that data may be read from any position in  the  file  in  any  order.    To
  5277. understand random file I/O, it may help  to  understand  the  concept  of  a
  5278. "read pointer".
  5279.  
  5280. The "read pointer" always points to the part of the file that will  be  read
  5281. in the next READ Statement.  When the file is opened, the  read  pointer  is
  5282. initialized to point to the first byte in the  file.  As  data  is  read  by
  5283. ensuing sequential READ Statements, the "read pointer" is increased  by  the
  5284. number of bytes read.
  5285.  
  5286. The AT <offset> [,<origin>]  clause  allows  you  to  reposition  the  "read
  5287. pointer":
  5288.  
  5289.  <offset>
  5290.       is the number of bytes from <origin>
  5291.  <origin>
  5292.       is a constant that defines the initial position:
  5293.  
  5294.        0 - beginning of the file (default)
  5295.        1 - current position of the "read pointer"
  5296.        2 - end of file
  5297.  
  5298. As with normal sequential reads, after a READ Statement with the  AT  clause
  5299. is executed, the "read pointer" is increased by the number of bytes read.
  5300.  
  5301. NOTE:
  5302.     If file has CR and LF at the end of each record, these will  be  counted
  5303.     as characters READ.
  5304.  
  5305. NOTE:
  5306.     To READ from end-of-data-set backwards, you must use a negative number.
  5307.  
  5308. Examples:
  5309.  
  5310. Assume a properly opened file contains the following 2 lines of data:
  5311.  
  5312.     12.34,ANY STRING
  5313.     "A QUOTED STRING"
  5314.  
  5315.     READ filenum a1,b1
  5316.     READ filenum c1,d1,e1
  5317.  
  5318. This example would set identifier a1 to 12.34, b1 to ANY, c1 to STRING,  and
  5319. d1 to A QUOTED STRING. Identifier e1 would be set to NULL since end of  file
  5320. was reached.
  5321.  
  5322.     READ LINE filenum a2
  5323.     READ LINE filenum b2
  5324.  
  5325. In this example, identifier a2 would be  set  to  12.34,ANY  STRING  and  b2
  5326. would be set to "A QUOTED STRING". Note that  identifier  a2  would  contain
  5327. the comma and identifier b2 would contain the quotation  marks  because  the
  5328. entire line is read in.
  5329.  
  5330. Read 100 bytes from a file starting at byte position 500:
  5331.  
  5332.     READ BUFFER xbuff FOR 100 AT 500
  5333.  
  5334. Read the last 2 bytes in a file:
  5335.  
  5336.     READ BUFFER xbuff FOR 2 AT 2,2
  5337.  
  5338. See Also:
  5339.  
  5340.   CLOSE
  5341.   DIM
  5342.   OPEN
  5343.   READ_POSITION
  5344.   WRITE
  5345.  
  5346.  
  5347.  
  5348.  
  5349.                         12.72 READ_POSITION Function                        
  5350.  
  5351.  
  5352. Purpose:
  5353.  
  5354. To obtain the current "read pointer".
  5355.  
  5356. Format:
  5357.  
  5358.   ┌──────────────────────────────────────────────────────────────────────┐
  5359.   │ READ_POSITION(<filenum>)                                             │
  5360.   └──────────────────────────────────────────────────────────────────────┘
  5361.  
  5362. Remarks:
  5363.  
  5364. Returns the current position of the "read pointer" for  the  file  indicated
  5365. by filenum.  See the READ  Statement  for  more  information  on  the  "read
  5366. pointer".
  5367.  
  5368. Examples:
  5369.  
  5370.     set t_pointer = READ_POSITION(in_file)
  5371.  
  5372. See Also:
  5373.  
  5374.   READ
  5375.   WRITE
  5376.   WRITE_POSITION
  5377.  
  5378.  
  5379.  
  5380.  
  5381.                         12.73 RECEIVE_FILE Statement                        
  5382.  
  5383.  
  5384. Purpose:
  5385.  
  5386. The RECEIVE_FILE Statement allows you to invoke file transfer  Receive  File
  5387. requests directly from AUTOPILOT.
  5388.  
  5389. Format:
  5390.  
  5391.   ┌──────────────────────────────────────────────────────────────────────┐
  5392.   │ RECEIVE_FILE [NOWAIT] <file-transfer-command>                        │
  5393.   │                         USING <file-transfer-type>                   │
  5394.   └──────────────────────────────────────────────────────────────────────┘
  5395.  
  5396.  
  5397. Remarks:
  5398.  
  5399. The string expression <file-transfer-command> indicates which file(s)are  to
  5400. be transferred.  Certain options may  also  be  specified  here.  The  exact
  5401. format is dependent on the type of file transfer:
  5402.  
  5403. XMODEM/YMODEM/KERMIT
  5404.  file specification of the file to RECEIVE.
  5405.  
  5406. IND$FILE
  5407.  the IND$FILE command line.  For example, the following would  be  specified
  5408.  to RECEIVE the CMS file TEST FILE A onto the C disk.
  5409.  
  5410.       C:\TEST.TXT TEST FILE A (ASCII CRLF
  5411.  
  5412. The string expression <file-transfer-type> determines  which  file  transfer
  5413. protocol to use.  It may be one of the following:
  5414.  
  5415.   XMODEM          = Use XMODEM CRC protocol
  5416.   XMODEM_CRC      = Use XMODEM CRC protocol
  5417.   XMODEM_CHECKSUM = Use XMODEM CHECKSUM protocol
  5418.   XMODEM_1K       = Use XMODEM 1K protocol
  5419.   XMODEM_1K_G     = Use XMODEM 1K G protocol
  5420.   YMODEM          = Use YMODEM protocol
  5421.   YMODEM_G        = Use YMODEM G protocol
  5422.   ZMODEM          = Use ZMODEM protocol
  5423.   KERMIT          = Use KERMIT SEND/RECEIVE protocol
  5424.   IND$FILE        = Use IBM IND$FILE (SEND/RECEIVE) protocol
  5425.   ASCII           = Use Ascii protocol
  5426.   CIS_B           = Use Compuserve B or B+ protocol
  5427.  
  5428. The default location for files on the PC is in the  directory  specified  by
  5429. the  DATA_DIRECTORY  Customization  Variable.    To  view  or  modify  this
  5430. variable, select System Configuration from the Utilities pull down  menu  on
  5431. any Phone Book.
  5432.  
  5433. The RECEIVE_FILE  command,  by  default,  will  wait  for  the  transfer  to
  5434. complete before returning.  Upon completion, RETURN_CODE will be set to  one
  5435. of the following values:
  5436.  
  5437.  0  - Successful completion
  5438.  1  - Not connected
  5439.  2  - The file could not be opened.
  5440.  3  - Syntax error within <file-transfer-command> or <file-transfer-type>
  5441.  4  - File transfer failed
  5442.  5  - File transfer was canceled
  5443.  
  5444. If the NOWAIT option is specified, the RECEIVE_FILE  Statement  will  return
  5445. immediately after starting the transfer.    Other  script  commands  can  be
  5446. executed while the transfer runs  (the  script  may  also  be  exited).  The
  5447. status of the file transfer may be determined via  the  FILE_TRANSFER_STATUS
  5448. Function.  Refer to this Function for a list of the values returned.
  5449.  
  5450. Examples:
  5451.  
  5452. Download a file from a BBS using XMODEM:
  5453.  
  5454.   RECEIVE_FILE "arc.exe" USING "XMODEM"
  5455.   IF RETURN_CODE <> 0
  5456.     BEGIN
  5457.       DISPLAY "Error"
  5458.       BEEP
  5459.       GOTO ...
  5460.     END
  5461.  
  5462. See Also
  5463.  
  5464.   SEND_FILE
  5465.   FILE_TRANSFER_STATUS
  5466.  
  5467.  
  5468.  
  5469.  
  5470.                           12.74 RELEASE Statement                           
  5471.  
  5472.  
  5473. Purpose:
  5474.  
  5475. This statement will unlock the current host session.
  5476.  
  5477. Format:
  5478.  
  5479.   ┌──────────────────────────────────────────────────────────────────────┐
  5480.   │ RELEASE                                                              │
  5481.   └──────────────────────────────────────────────────────────────────────┘
  5482.  
  5483. Remarks:
  5484.  
  5485. This statement will unlock the current session from  a  previously  RESERVEd
  5486. session. Users will then be allowed to key into the current session.
  5487.  
  5488. See Also:
  5489.  
  5490.   RESERVE
  5491.  
  5492.  
  5493.  
  5494.  
  5495.                         12.75 REMOVE FROM Statement                         
  5496.  
  5497.  
  5498. Purpose:
  5499.  
  5500. The REMOVE FROM  Statement  is  used  to  remove  various  items  from  text
  5501. windows, dialogs, session monitors and DDE_LINK objects.
  5502.  
  5503. Format:
  5504.  
  5505.   ┌──────────────────────────────────────────────────────────────────────┐
  5506.   │ Dialog Windows:                                                      │
  5507.   │                                                                      │
  5508.   │ REMOVE FROM DIALOG_WINDOW(winid)                                     │
  5509.   │              {TITLE_BAR     }                                        │
  5510.   │              {SYSTEM_MENU   }                                        │
  5511.   │              {MINIMIZE_BUTTON }                                      │
  5512.   │              {MAXIMIZE_BUTTON }                                      │
  5513.   │              {TASK_LIST   _ }                                        │
  5514.   │              {ACTION_BAR_MENU } ...                                  │
  5515.   │                                                                      │
  5516.   │ REMOVE FROM ACTION_BAR_MENU                                          │
  5517.   │          [ IN DIALOG_WINDOW(winid) ]                                 │
  5518.   │          [ IN TEXT_WINDOW(winid)  ]                                  │
  5519.   │             PULLDOWN(id)                                             │
  5520.   │                                                                      │
  5521.   │ REMOVE FROM PULLDOWN(id)                                             │
  5522.   │          [ IN DIALOG_WINDOW(winid)      ]                            │
  5523.   │          [ IN TEXT_WINDOW(winid)        ]                            │
  5524.   │             {CHOICE(id)   }                                          │
  5525.   │             {SEPARATOR(id) }                                         │
  5526.   │                                                                      │
  5527.   │ REMOVE FROM {LIST_BOX(id)         }                                  │
  5528.   │          {COMBINATION_BOX(id)    }                                   │
  5529.   │          {MULTILINE_ENTRY_FIELD(id) }                                │
  5530.   │             [ IN DIALOG_WINDOW(winid) ]                              │
  5531.   │              LINES <pos1 [ TO  <pos2> ]                              │
  5532.   │                                                                      │
  5533.   │ REMOVE FROM DIALOG_WINDOW(winid)                                     │
  5534.   │            { TEXT_FIELD(id)         }                                │
  5535.   │            { ENTRY_FIELD(id)        }                                │
  5536.   │            { MULTILINE_ENTRY_FIELD(id)   }                           │
  5537.   │            { PUSH_BUTTON(id)       }                                 │
  5538.   │            { RADIO_BUTTON(id)       }                                │
  5539.   │            { CHECK_BOX(id)        }                                  │
  5540.   │            { LIST_BOX(id)          }                                 │
  5541.   │            { COMBINATION_BOX(id)     }                               │
  5542.   │            { GROUP_BOX(id)        }                                  │
  5543.   │            { ICON_FIELD(id)         }                                │
  5544.   └──────────────────────────────────────────────────────────────────────┘
  5545.   ┌──────────────────────────────────────────────────────────────────────┐
  5546.   │ Text Windows:                                                        │
  5547.   │                                                                      │
  5548.   │ REMOVE FROM TEXT_WINDOW(winid)                                       │
  5549.   │              {TITLE_BAR         }                                    │
  5550.   │              {SYSTEM_MENU       }                                    │
  5551.   │              {MINIMIZE_BUTTON     }                                  │
  5552.   │              {MAXIMIZE_BUTTON     }                                  │
  5553.   │              {HORIZONTAL_SCROLL_BAR }                                │
  5554.   │              {VERTICAL_SCROLL_BAR   }                                │
  5555.   │              {TASK_LIST          }                                   │
  5556.   │              {ACTION_BAR_MENU     } ...                              │
  5557.   └──────────────────────────────────────────────────────────────────────┘
  5558.   ┌──────────────────────────────────────────────────────────────────────┐
  5559.   │ Session Monitors:                                                    │
  5560.   │                                                                      │
  5561.   │ REMOVE FROM SESSION_MONITOR (monitorid)                              │
  5562.   │                 [ TEXT_WATCH(id) ]...                                │
  5563.   │                 [ HOST_KEY_WATCH(id) ]...                            │
  5564.   │                                                                      │
  5565.   └──────────────────────────────────────────────────────────────────────┘
  5566.   ┌──────────────────────────────────────────────────────────────────────┐
  5567.   │ DDE Links:                                                           │
  5568.   │                                                                      │
  5569.   │ Format 1:                                                            │
  5570.   │  REMOVE FROM DDE_LINK(linkid)                                        │
  5571.   │   [ TOPIC (id) ]...                                                  │
  5572.   │                                                                      │
  5573.   │ Format 2:                                                            │
  5574.   │  REMOVE FROM TOPIC(id ) [ IN DDE_LINK(linkid) ]                      │
  5575.   │   [ HOT_LINK (id) [ WARM_LINK (id) ] ]                               │
  5576.   │                                                                      │
  5577.   │ Format 3:                                                            │
  5578.   │  REMOVE FROM TOPIC(id ) [ IN DDE_LINK(linkid) ]                      │
  5579.   │   [ EXPORT_ITEM (id) ]...                                            │
  5580.   │   [ EXPORT_COMMAND (id) ]...                                         │
  5581.   └──────────────────────────────────────────────────────────────────────┘
  5582.  
  5583. Remarks:
  5584.  
  5585. Dialog Window Formats:
  5586.  
  5587. When you use the REMOVE  FROM  DIALOG_WINDOW  format,  you  must  CLOSE  and
  5588. reOPEN the dialog before the control will be removed.
  5589. Text Window Formats:
  5590.  
  5591. For more information on text windows, refer to the Appendix, Migration  From
  5592. DOS.
  5593.  
  5594. Session Monitor Formats:
  5595.  
  5596. When you use the REMOVE FROM SESSION_MONITOR format, monitorid must  be  the
  5597. id of a session monitor object created by CREATE SESSION_MONITOR and  id  is
  5598. the id of a watch item previously defined in the session monitor  object  by
  5599. CREATE or ADD TO.
  5600.  
  5601. DDE Link Formats:
  5602.  
  5603. When you use the REMOVE FROM DDE_LINK(linkid ) format, it  removes  a  TOPIC
  5604. definition (with  associated  HOT_LINKS  and  WARM_LINKS)  from  a  DDE_LINK
  5605. object. The TOPIC is closed before it is removed.
  5606.  
  5607. The second format removes HOT_LINK  and/or  WARM_LINK  items  from  a  TOPIC
  5608. definition. If the TOPIC is opened  and  enabled,  an  unadvise  transaction
  5609. will be generated for all enabled HOT_LINK and  WARM_LINK  link  items  that
  5610. are removed.
  5611.  
  5612. The third format removes EXPORT_ITEM and/or EXPORT_COMMAND  entries  from  a
  5613. TOPIC definition.
  5614.  
  5615. Examples:
  5616.  
  5617.   REMOVE FROM DDE_LINK(1)
  5618.               TOPIC (2)
  5619.   ADD TO TOPIC(1)
  5620.             HOT_LINK (1)
  5621.             HOT_LINK (2)
  5622.  
  5623. See Also:
  5624.  
  5625.   ADD TO
  5626.  
  5627.  
  5628.  
  5629.  
  5630.                           12.76 RESERVE Statement                           
  5631.  
  5632.  
  5633. Purpose:
  5634.  
  5635. This statement locks the current host session  to  prevent  all  user  keyed
  5636. input.
  5637.  
  5638. Format:
  5639.  
  5640.   ┌──────────────────────────────────────────────────────────────────────┐
  5641.   │ RESERVE                                                              │
  5642.   └──────────────────────────────────────────────────────────────────────┘
  5643.  
  5644. Remarks:
  5645.  
  5646. This function can be used to prevent the user from keying  into  a  selected
  5647. session.
  5648.  
  5649. SENDs may be executed while a session is RESERVEd.
  5650.  
  5651. Multiple sessions can be locked. You may  not  lock  a  workstation  control
  5652. session.
  5653.  
  5654. The presentation space remains locked until a RELEASE is issued.
  5655.  
  5656. See Also:
  5657.  
  5658.   RELEASE
  5659.  
  5660.  
  5661.  
  5662.  
  5663.                            12.77 RESUME Statement                           
  5664.  
  5665.  
  5666. Purpose:
  5667.  
  5668. The RESUME Statement continues program execution after an ON  condition,  an
  5669. action bar menu  CHOICE,  or  a  dialog  control  ACTION  routine  has  been
  5670. performed.
  5671.  
  5672. Format:
  5673.  
  5674.   ┌──────────────────────────────────────────────────────────────────────┐
  5675.   │ RESUME {TIMEOUT }  { RETRY   }                                       │
  5676.   │        {ACTION  }  { NEXT    }  <code>                               │
  5677.   │                    { <label> }                                       │
  5678.   └──────────────────────────────────────────────────────────────────────┘
  5679.  
  5680. Remarks:
  5681.  
  5682. RESUME <condition> RETRY causes execution to resume at the  statement  which
  5683. caused the condition to occur.  RESUME <condition> NEXT causes execution  to
  5684. resume at the statement immediately  following  the  one  which  caused  the
  5685. condition to occur. RESUME <condition> <label> causes  execution  to  resume
  5686. at the specified label.
  5687.  
  5688. RESUME ACTION is used  for  action  bar  menu  CHOICEs  and  dialog  control
  5689. ACTIONs.  If the routine received control from an  action  bar  menu,  RETRY
  5690. will ENABLE the action bar menu that  was  DISABLED  when  the  routine  was
  5691. triggered.  With action bar menus and dialog controls, if a WAIT FOR  ACTION
  5692. was specified, RESUME ACTION RETRY would be used to return to it.
  5693. For more information using RESUME with text windows, refer to the  Appendix,
  5694. Migration From DOS.
  5695.  
  5696. The <code> value may be specified only for RESUME ACTION and only with  DDE.
  5697. The code entered will be returned to the DDE requester as a return code.
  5698.  
  5699. Examples:
  5700.  
  5701.     RESUME TIMEOUT RETRY
  5702.  
  5703. See Also:
  5704.  
  5705.   ON
  5706.   SIGNAL
  5707.   WAIT FOR ACTION
  5708.  
  5709.  
  5710.  
  5711.  
  5712.                            12.78 RETURN Statement                           
  5713.  
  5714. Purpose:
  5715.  
  5716. To return from a subroutine initiated by a perform.
  5717.  
  5718. Format:
  5719.  
  5720.   ┌──────────────────────────────────────────────────────────────────────┐
  5721.   │ RETURN                                                               │
  5722.   └──────────────────────────────────────────────────────────────────────┘
  5723.  
  5724. Remarks:
  5725.  
  5726. The RETURN Statement causes the AUTOPILOT program  to  branch  back  to  the
  5727. statement following the most  recent  PERFORM  Statement.  If  there  is  no
  5728. active perform, the RETURN Statement is ignored.
  5729.  
  5730. See Also:
  5731.  
  5732.   PERFORM
  5733.  
  5734.  
  5735.  
  5736.  
  5737.                            12.79 ROUND Statement                            
  5738.  
  5739.  
  5740. Purpose:
  5741.  
  5742. Returns a number, rounded to a specified number of places.
  5743.  
  5744. Format:
  5745.  
  5746.   ┌──────────────────────────────────────────────────────────────────────┐
  5747.   │ ROUND(a,dec)                                                         │
  5748.   └──────────────────────────────────────────────────────────────────────┘
  5749.  
  5750. Remarks:
  5751.  
  5752. The ROUND function rounds off the number  a  to  dec  decimal places.
  5753.  
  5754. Examples:
  5755.  
  5756.     ROUND(123.456,2) returns 123.46
  5757.     ROUND(123.456,0) returns 123
  5758.     ROUND(123.456,4) returns 123.456
  5759.  
  5760.  
  5761.  
  5762.  
  5763.                             12.80 RUN Statement                             
  5764.  
  5765.  
  5766. Purpose:
  5767.  
  5768. Execute an OS/2 command or another script.
  5769.  
  5770. Formats:
  5771.  
  5772.   ┌──────────────────────────────────────────────────────────────────────┐
  5773.   │ RUN SCRIPT  <filespec>                                               │
  5774.   │        [ USING <string-1> [ , <string-n> ] ]                         │
  5775.   │                                                                      │
  5776.   │ RUN SYSTEM <cmd-name>                                                │
  5777.   │        [ USING <string-1> [ , <string-n> ] ]                         │
  5778.   │        [ NOWAIT ]                                                    │
  5779.   │                                                                      │
  5780.   │ RUN PROGRAM <program-name>                                           │
  5781.   │       [ USING <string-1> [ , <string-n> ] ]                          │
  5782.   │       [ WINDOW_SIZE <rows> [ DEVICE_ROWS ]    [,]                    │
  5783.   │                     <cols> [ DEVICE_COLUMNS ] ]                      │
  5784.   │       [ WINDOW_POSITION [ DEVICE_ROW ] <row> [,]                     │
  5785.   │                         [ DEVICE_COLUMN ] <col> ]                    │
  5786.   │       [ NOWAIT ]                                                     │
  5787.   └──────────────────────────────────────────────────────────────────────┘
  5788.  
  5789. Remarks:
  5790.  
  5791. Format 1:
  5792.  
  5793. When AUTOPILOT runs a script it uses the following search algorithm to  find
  5794. the script file:
  5795.  
  5796.  o If the script file specification includes a directory,  the  script  file
  5797.    must reside in that directory -- no other directories will be searched.
  5798.  
  5799.  o If  the  script  file  specification  does  not  include  a  directory,
  5800.    directories are searched in the following order:
  5801.  
  5802.   1. The directory of the parent script (this only applies to  scripts  that
  5803.       where called from another script).
  5804.  
  5805.   2. The directory specified by the SCRIPT_DIRECTORY Customization Variable.
  5806.  
  5807. If the optional USING clause is specified, <string-1>  thru  <string-n>  may
  5808. be referenced in the called script  positionally  as  %1  thru  %n.  The  %n
  5809. variables are local, that is, any change to a %n variable  will  not  effect
  5810. the value of <string-n> in the calling script.
  5811.  
  5812. When control returns from the called script (via the  EXIT  Statement),  the
  5813. statement following the RUN Statement will be executed.
  5814. The return code from the called script (set via the EXIT Statement), can  be
  5815. examined via the global variable RETURN_CODE.
  5816.  
  5817. Formats 2 And 3:
  5818.  
  5819. DOS  programs  CANNOT  be  run  utilizing  any  format  of  RUN.  There  are
  5820. essentially three types of programs that can be run  using  RUN  SYSTEM  and
  5821. RUN PROGRAM:
  5822.  
  5823.   1. Presentation Manager programs  that  can  run  in  a  PM  window  (i.e.
  5824.      TalkThru or the System Editor)
  5825.  
  5826.   2. window compatible programs that can run in either a VIO window or as  a
  5827.      full-screen application (i.e. the OS/2 Command Interpreter)
  5828.  
  5829.   3. programs that can run only as full screen applications
  5830.  
  5831. Format 2 of the RUN Statement invokes the program or CMD file  specified  in
  5832. <cmd-name> as if it was entered in response to  the  OS/2  prompt  utilizing
  5833. CMD.EXE to run it.
  5834.  
  5835. If the optional USING clause is specified, <string-1>  thru  <string-n>  are
  5836. appended to <string> to form a single command string.
  5837.  
  5838. Format 3 of the RUN Statement will invoke the  referenced  program  directly
  5839. without loading a secondary copy of CMD.EXE. This format is faster and  uses
  5840. less memory than RUN SYSTEM but may not  be  used  for  CMD  files.  When  a
  5841. program is executed in this manner, the RETURN_CODE may be  examined  within
  5842. the script.
  5843.  
  5844. <program-name>  should  include  an  extension  (.EXE)  since  the  path  is
  5845. searched.
  5846.  
  5847. If the optional USING clause is specified, <string-1>  thru  <string-n>  are
  5848. appended to <string> to form a single command string.
  5849.  
  5850. The optional WINDOW_SIZE and WINDOW_POSITION clauses allow you to  establish
  5851. the size of the initial window of the application you want to  run.    These
  5852. clauses work within the following guidelines:
  5853.  
  5854.   1. Full screen only applications ignore these clauses  as  they  can  only
  5855.      run as a full screen.
  5856.  
  5857.   2. Window compatible applications can run either as a full screen or as  a
  5858.      VIO window.  If WINDOW_SIZE and WINDOW_POSITION are NOT specified,  the
  5859.      application  will  run  as  a  full  screen.    If  WINDOW_SIZE  and/or
  5860.      WINDOW_POSITION ARE specified,  the  application  will  run  in  a  VIO
  5861.      window.  If WINDOW_SIZE is not specified, the size  will  be  half  the
  5862.      height of the desktop and half the width.  If  WINDOW_POSITION  is  not
  5863.      specified, the window will be centered.
  5864.  
  5865.   3. Presentation Manager programs can only run in a PM window.  WINDOW_SIZE
  5866.      and/or  WINDOW_POSITION  clauses  may  be  specified  to  give  the
  5867.      application its initial window size (default size and position  is  the
  5868.      same as  above).    However,  most  PM  applications  will  ignore  the
  5869.      specified initial size and position and will place and size the  window
  5870.      itself.
  5871.  
  5872. The NOWAIT clause causes AUTOPILOT to invoke the  application  and  continue
  5873. immediately -- it does not wait for the application to complete.  If  NOWAIT
  5874. is NOT specified, AUTOPILOT will wait for the application to end.    If  the
  5875. AUTOPILOT program is canceled while an application invoked via  RUN  without
  5876. NOWAIT is still running, the application is also canceled.  If an  AUTOPILOT
  5877. program ends while a NOWAIT application is still  running,  the  application
  5878. continues to run.
  5879.  
  5880. Examples:
  5881.  
  5882.      RUN SCRIPT "script2.scr" 
  5883.  
  5884.      RUN SCRIPT "a:\scrdir\another.scr" 
  5885.  
  5886.      RUN  SCRIPT  script_iden  USING  "any  string",  any_iden,  123.45
  5887.     
  5888.      RUN SYSTEM "prog1 a:file.ext -a" 
  5889.  
  5890.      RUN PROGRAM "prog1.exe" USING "a:file.ext" , "-a" 
  5891.  
  5892.      RUN SYSTEM "DIR A:\"
  5893.  
  5894. See Also:
  5895.  
  5896.   EXIT
  5897.   RETURN_CODE
  5898.  
  5899.  
  5900.  
  5901.  
  5902.                            12.81 SCREEN Function                            
  5903.  
  5904.  
  5905. Purpose:
  5906.  
  5907. Returns a string consisting of the characters on the HOST screen.
  5908.  
  5909. Format:
  5910.  
  5911.   ┌──────────────────────────────────────────────────────────────────────┐
  5912.   │ SCREEN                                                               │
  5913.   └──────────────────────────────────────────────────────────────────────┘
  5914.  
  5915. Remarks:
  5916.  
  5917. The characters on the HOST screen (except the status line) are  returned  as
  5918. a string. Attributes and NULL  characters  on  the  screen  are  changed  to
  5919. spaces.
  5920.  
  5921. Examples:
  5922.  
  5923.     SET a = SCREEN
  5924.     SET b = STR_LEFT(a,80)
  5925.  
  5926. This example would set b equal to line 1 of the HOST screen.
  5927.  
  5928.     DISPLAY STR_LEFT(SCREEN, 80);
  5929.  
  5930. This example would display line 1 of the HOST screen.
  5931.  
  5932. See Also:
  5933.  
  5934.   INSTR
  5935.   LOOK FOR
  5936.   WAIT FOR
  5937.  
  5938.  
  5939.  
  5940.  
  5941.                          12.82 SCRIPT_INFO Function                         
  5942.  
  5943.  
  5944. Purpose:
  5945.  
  5946. Return various types of script information.
  5947.  
  5948. Format:
  5949.  
  5950.   ┌──────────────────────────────────────────────────────────────────────┐
  5951.   │ SCRIPT_INFO (type)                                                   │
  5952.   └──────────────────────────────────────────────────────────────────────┘
  5953.  
  5954. Remarks:
  5955.  
  5956. SCRIPT_INFO is used to obtain different types of information related to  the
  5957. current AUTOPILOT session.
  5958.  
  5959. Type  Information Returned
  5960.  1    the full file name of the current script is returned.
  5961.  2    the full file name of the script that called  the  current  script  is
  5962.       returned. If the current script  was  not  called  by  another  script
  5963.       (i.e. its the main script),, a null string is returned.
  5964.  
  5965. See Also:
  5966.  
  5967.   RUN SCRIPT
  5968.  
  5969.  
  5970.  
  5971.  
  5972.                         12.83 SEARCH_ARRAY Statement                        
  5973.  
  5974.  
  5975. Purpose:
  5976.  
  5977. The SEARCH_ARRAY Statement is used to quickly  search  the  elements  of  an
  5978. array for a specific value.
  5979.  
  5980. Format:
  5981.  
  5982.   ┌──────────────────────────────────────────────────────────────────────┐
  5983.   │ SEARCH_ARRAY arrayname                                               │
  5984.   │       [ ( [FROM dim, ... ] [TO dim,...] ) ]                          │
  5985.   │          FOR <value>                                                 │
  5986.   │            [ USING search-options ]                                  │
  5987.   └──────────────────────────────────────────────────────────────────────┘
  5988.  
  5989. Remarks:
  5990.  
  5991.  arrayname
  5992.       - may be a 1,2, or 3 dimensional array
  5993.  
  5994.  value
  5995.       - may be any string or numeric expression.
  5996.  
  5997.  FROM
  5998.       - optional clause defaults to the first element in the array
  5999.  
  6000.  TO
  6001.       - optional clause defaults to the last element in the array
  6002.  
  6003.  USING
  6004.       - optional clause specifies search options that are a  subset  of  the
  6005.         options specified in the USING clause of the SORT statement
  6006.  
  6007. This statement searches the elements of an array for a  specific  value.  If
  6008. no range is specified all the elements are searched. If a range is set  than
  6009. all the elements within the range are searched. The FROM clause defines  the
  6010. starting indices and the TO clause defines the ending  indices.  Each  index
  6011. is never varied outside of the defined range (See SET_ARRAY).
  6012.  
  6013. If the value is  found  RETURN_CODE  is  set  to  0.  If  it  is  not  found
  6014. RETURN_CODE is set to 1. The indices of the  found  item  can  be  retrieved
  6015. from the Function ARRAY_INDEX. For example:
  6016.  
  6017.   DIM myarray(10,5)
  6018.   SEARCH_ARRAY myarray (FROM 2,3 TO 5,4) FOR "A string"
  6019.  
  6020.   IF RETURN_CODE = 1
  6021.     BEGIN
  6022.       DISPLAY "NOT FOUND"
  6023.     EXIT
  6024.   END
  6025.  
  6026.   SET s = myarray(ARRAY_INDEX(1),ARRAY_INDEX(2))
  6027.  
  6028. Elements (2,3), (2,4), (3,3), (3,4), (4,3), (4,4), (5,3),  and  (5,4)  would
  6029. all be set to 0. All other elements would remain unchanged.
  6030.  
  6031. If no USING clause is specified the type  of  comparison  done  (string  vs.
  6032. numeric) is determined by the type of the expression specified  in  the  FOR
  6033. clause.
  6034.  
  6035. The USING clause uses a subset of the SORT USING options.  This  allows  you
  6036. to explicitly specify the type of search (numeric  or  string)  rather  than
  6037. rely on the type of expression specified in the FOR  clause.  It  also  lets
  6038. you do case insensitive searches. The valid  options  are  'T1',  'T2',  and
  6039. 'T3'. 'On' may also be included. See the SORT option for more details.
  6040.  
  6041. See Also:
  6042.  
  6043.   SET ARRAY
  6044.  
  6045.  
  6046.  
  6047.  
  6048.                            12.84 SELECT Statement                           
  6049.  
  6050.  
  6051. Purpose:
  6052.  
  6053. The SELECT Statement allows the script  to  select  a  line  from  within  a
  6054. LIST_BOX or COMBINATION_BOX dialog control.
  6055.  
  6056. Remarks:
  6057.  
  6058.   ┌──────────────────────────────────────────────────────────────────────┐
  6059.   │ SELECT {LIST_BOX(id)      }                                          │
  6060.   │        {COMBINATION_BOX(id) }                                        │
  6061.   │           [ IN DIALOG_WINDOW (winid) ]                               │
  6062.   │              LINE <num>                                              │
  6063.   └──────────────────────────────────────────────────────────────────────┘
  6064.  
  6065. Remarks:
  6066.  
  6067. When an item is SELECTed, a reverse video Selector Bar will appear  over  it
  6068. and it's number will be returned through the SELECTED_LINE Function.
  6069.  
  6070. Unless  the  item  is  a  MULTIPLE_SELECTION  LIST_BOX,  selecting  1  line
  6071. automatically deselects the current selection.
  6072.  
  6073. See Also:
  6074.  
  6075.   DESELECT
  6076.   SELECTED_LINE
  6077.  
  6078.  
  6079.  
  6080.  
  6081.                         12.85 SELECTED_LINE Function                        
  6082.  
  6083.  
  6084. Purpose:
  6085.  
  6086. This function returns the line number of the selected item in a LIST_BOX  or
  6087. COMBINATION_BOX.
  6088.  
  6089. Format:
  6090.  
  6091.   ┌──────────────────────────────────────────────────────────────────────┐
  6092.   │ SELECTED_LINE ( {LIST_BOX(id)      }                                 │
  6093.   │                 {COMBINATION_BOX(id) }                               │
  6094.   │                         [ IN DIALOG_WINDOW(winid) ]                  │
  6095.   │                         [ ,<start lineno> ]       )                  │
  6096.   └──────────────────────────────────────────────────────────────────────┘
  6097.  
  6098. Remarks:
  6099.  
  6100. If no lines are selected, 0 is returned.
  6101.  
  6102. The  optional  <startlineno>  parameter  is  used  in  MULTIPLE_SELECTION
  6103. LIST_BOXes. If  included,  the  Function  returns  the  next  selected  line
  6104. starting with and  including  <startlineno>.  If  not  included,  the  first
  6105. selected line number is returned.
  6106.  
  6107. See Also:
  6108.  
  6109.   SELECT
  6110.   DESELECT
  6111.   TEXT_OF
  6112.  
  6113.  
  6114.  
  6115.  
  6116.                             12.86 SEND Statement                            
  6117.  
  6118.  
  6119. Purpose:
  6120.  
  6121. Transmits character and/or control key sequences to the HOST.
  6122.  
  6123. Format:
  6124.  
  6125.   ┌──────────────────────────────────────────────────────────────────────┐
  6126.   │ SEND {<string> } [{<string> }]                                       │
  6127.   │      {<key>  }  [,{<key>  }]                                         │
  6128.   └──────────────────────────────────────────────────────────────────────┘
  6129.  
  6130. Remarks:
  6131.  
  6132. Characters and control keys are sent to the host as if they were entered  at
  6133. the terminal.
  6134.  
  6135. An attempt to send characters to protected screen positions  may  cause  the
  6136. terminal keyboard to  lock.  All  subsequent  characters  and  control  keys
  6137. within the SEND Statement will be ignored.
  6138. The SEND statement will not be executed until the terminal  is  in  a  ready
  6139. state.
  6140.  
  6141. A list of the valid 3270 <key> names is provided under Definition  Of  Terms
  6142. in the AUTOPILOT Language Overview chapter in this manual.
  6143.  
  6144. Examples:
  6145.  
  6146.     SEND "logon ", USERID, " ", PASSWORD, ENTER
  6147.  
  6148.     SEND TAB, TAB, TAB, "X", TAB, "X", PF9
  6149.  
  6150.     SEND " B", ENTER
  6151.  
  6152. See Also:
  6153.  
  6154.   LOOK FOR
  6155.   QUIET
  6156.   WAIT FOR
  6157.  
  6158.  
  6159.  
  6160.  
  6161.                          12.87 SEND_FILE Statement                          
  6162.  
  6163.  
  6164. Purpose:
  6165.  
  6166. The SEND_FILE Statement  allows  you  to  invoke  file  transfer  Send  File
  6167. requests directly from AUTOPILOT.
  6168.  
  6169. Format:
  6170.  
  6171.   ┌──────────────────────────────────────────────────────────────────────┐
  6172.   │ SEND_FILE [NOWAIT] <file-transfer-command>                           │
  6173.   │                 USING <file-transfer-type>                           │
  6174.   └──────────────────────────────────────────────────────────────────────┘
  6175.  
  6176. Remarks:
  6177.  
  6178. The string expression <file-transfer-command> indicates which file(s)are  to
  6179. be transferred.  Certain options may  also  be  specified  here.  The  exact
  6180. format is dependent on the type of file transfer:
  6181.  
  6182. XMODEM/YMODEM/KERMIT
  6183.  file specification of the file to SEND.
  6184.  
  6185. IND$FILE
  6186.  the IND$FILE command line.  For example, the following would  be  specified
  6187.  to SEND the PC file C:\TEST.TXT to a CMS system.
  6188.  
  6189.       C:\TEST.TXT TEST FILE A (ASCII CRLF
  6190.  
  6191. The string expression <file-transfer-type> determines  which  file  transfer
  6192. protocol to use.  It may be one of the following:
  6193.  
  6194.   ASCII            = Use Ascii protocol
  6195.   CIS_B            = Use Compuserv B or B+
  6196.   XMODEM           = Use XMODEM CRC protocol
  6197.   XMODEM_CRC       = Use XMODEM CRC protocol
  6198.   XMODEM_CHECKSUM  = Use XMODEM CHECKSUM protocol
  6199.   XMODEM_1K        = Use XMODEM 1K protocol
  6200.   XMODEM_1K_G      = User XMODEM 1K G protocol
  6201.   YMODEM           = Use YMODEM protocol
  6202.   YMODEM_G         = Use YMODEM G protocol
  6203.   ZMODEM           = Use ZMODEM protocol
  6204.   KERMIT           = Use KERMIT SEND/RECEIVE protocol
  6205.   IND$FILE         = Use IBM IND$FILE (SEND/RECEIVE) protocol
  6206.  
  6207. The default location for files on the PC is in the  directory  specified  by
  6208. the  DATA_DIRECTORY  Customization  Variable.    To  view  or  modify  this
  6209. variable, select System Configuration from the Utilities pull down  menu  on
  6210. any Phone Book.
  6211.  
  6212. The SEND_FILE command, by default, will wait for the  transfer  to  complete
  6213. before returning.  Upon completion, RETURN_CODE will be set to  one  of  the
  6214. following values:
  6215.  
  6216.  0  - Successful completion
  6217.  1  - Not connected
  6218.  2  - The file could not be opened.
  6219.  3  - Syntax error within <file-transfer-command> or <file-transfer-type>
  6220.  4  - File transfer failed
  6221.  5  - File transfer was canceled
  6222.  
  6223. If the NOWAIT option is  specified,  the  SEND_FILE  Statement  will  return
  6224. immediately after starting the transfer.    Other  script  commands  can  be
  6225. executed while the transfer runs  (the  script  may  also  be  exited).  The
  6226. status of the file transfer may be determined via  the  FILE_TRANSFER_STATUS
  6227. Function.  Refer to this Function for a list of the values returned.
  6228.  
  6229. Examples:
  6230.  
  6231. Send a file to another PC using XMODEM and continue processing:
  6232.  
  6233.   SEND_FILE NOWAIT "data.prn" USING "XMODEM"
  6234.  
  6235.     ... processing ...
  6236.  
  6237.   WAIT UNTIL FILE_TRANSFER_STATUS < 10   ; Wait until its done
  6238.  
  6239. See Also:
  6240.  
  6241.   RECEIVE_FILE
  6242.   FILE_TRANSFER_STATUS
  6243.  
  6244.  
  6245.  
  6246.  
  6247.                             12.88 SET Statement                             
  6248.  
  6249.  
  6250. Purpose:
  6251.  
  6252. Assigns values to either  AUTOPILOT  reserved  or  user  specified  variable
  6253. fields. It is also used to modify text window, dialogs and  session  monitor
  6254. objects.
  6255.  
  6256. Formats:
  6257.  
  6258.   ┌──────────────────────────────────────────────────────────────────────┐
  6259.   │ SET <identifier> = {<number>} [<operator> <number> ]                 │
  6260.   │                    {<string> } [<operator> <string>]                 │
  6261.   │                                                                      │
  6262.   │ SET MAXWAIT = <timeval>                                              │
  6263.   │                                                                      │
  6264.   │                          { <SECOND(S)> }                             │
  6265.   │ SET MAXWAIT = <number>   { <MINUTE(S)> }                             │
  6266.   │                          { <HOUR(S)>   }                             │
  6267.   │                                                                      │
  6268.   │ SET facility>-trace facility>TRACE {ON   }                           │
  6269.   │                                    {OFF }                            │
  6270.   │                                                                      │
  6271.   │ SET TRACE_DELAY = <number>                                           │
  6272.   │                                                                      │
  6273.   │ SET CAPTURE  {ON } [ <filename> ]                                    │
  6274.   │              {OFF }                                                  │
  6275.   │                                                                      │
  6276.   │ SET KEEP  {ON  }                                                     │
  6277.   │           {OFF}                                                      │
  6278.   │                                                                      │
  6279.   │ SET NUMERIC_PRECISION = <precision>                                  │
  6280.   │ SET NUMERIC_FORMAT = <value>                                         │
  6281.   │                                                                      │
  6282.   │ SET SEND_MNEMONIC {ON }                                              │
  6283.   │                   {OFF}                                              │
  6284.   │                                                                      │
  6285.   │ SET TITLE_BAR <title-string>                                         │
  6286.   │     WINDOW_SIZE <rows>  [ { TEXT_ROWS  } ]                           │
  6287.   │                         [ { DEVICE_ROWS } ]  [ , ]                   │
  6288.   │                 <cols>  [ { TEXT_COLUMNS  }  ]                       │
  6289.   │                         [ { DEVICE_COLUMNS  } ]                      │
  6290.   │     WINDOW_POSITION [ DEVICE_ROW[S]   ]  <rows>                      │
  6291.   │                     [ DEVICE_COLUMN[S] ] <cols> [ , ]                │
  6292.   │                                                                      │
  6293.   │ SET CURRENT_WINDOW = <window-number>                                 │
  6294.   │                                                                      │
  6295.   │ SET { PULLDOWN } <refno  = { <text>      }                           │
  6296.   │     { CHOICE   }           { ACTION <label> }                        │
  6297.   │                                                                      │
  6298.   │ SET {TEXT_FIELD(id)         }                                        │
  6299.   │     {ENTRY_FIELD(id)        }                                        │
  6300.   │     {MULTILINE_ENTRY_FIELD(id)  }                                    │
  6301.   │     {PUSH_BUTTON(id)       }                                         │
  6302.   │     {RADIO_BUTTON(id)      }                                         │
  6303.   │     {CHECK_BOX(id)        }                                          │
  6304.   │     {LIST_BOX(id)          }                                         │
  6305.   │     {COMBINATION_BOX(id)     }                                       │
  6306.   │     {GROUP_BOX(id)         }                                         │
  6307.   │     {ICON_FIELD(id)       _}                                         │
  6308.   │       [ IN DIALOG_WINDOW(winid) ] =                                  │
  6309.   │            { <text-string>     }                                     │
  6310.   │            { ACTION <label>    }                                     │
  6311.   │            { SIZE <rowsize> ,_<co lsize> }                           │
  6312.   │            { AT <rowpos>  , <colpos> }                               │
  6313.   │                                                                      │
  6314.   │ SET ACTION [ IN DIALOG_WINDOW (winid) ] = <label>                    │
  6315.   │                                                                      │
  6316.   │ SET SESSION                                                          │
  6317.   │      [ IN SESSION_MONITOR(monitorid ) ] [ = ] sessid                 │
  6318.   │                                                                      │
  6319.   │ SET TEXT_WATCH(id)                                                   │
  6320.   │      [ IN SESSION_MONITOR(monitorid) ] [ = ] string                  │
  6321.   │      [ AT | FROM | TO clause(s) ]                                    │
  6322.   │      [ ACTION label ]                                                │
  6323.   │                                                                      │
  6324.   │ SET HOST_KEY_WATCH(id)                                               │
  6325.   │      [ IN SESSION_MONITOR(monitorid) ] [ = ] key                     │
  6326.   │      [ ACTION label ]                                                │
  6327.   │                                                                      │
  6328.   │ SET SEND_WAIT_TYPE = type                                            │
  6329.   └──────────────────────────────────────────────────────────────────────┘
  6330.  
  6331. Remarks:
  6332.  
  6333. SET <identifier> is the most frequently used format. It is  used  to  assign
  6334. the result of an expression to the specified identifier.
  6335.  
  6336. The remainder of  the  formats  are  used  to  assign  values  to  AUTOPILOT
  6337. reserved values.
  6338.  
  6339. MAXWAIT is the global timeout keyword identifier whose value  will  be  used
  6340. in all screen WAIT operations unless an overriding value is encoded  on  the
  6341. specific WAIT Statement being executed. <timeval> is a  number  followed  by
  6342. the time measurement (SECONDS, MINUTES, or HOURS).  The  default  value  for
  6343. MAXWAIT is 60 SECONDS.
  6344.  
  6345. MSGLINE is the global row value keyword identifier used in all  DISPLAY  and
  6346. PROMPT  activity  unless  overridden  by  the  individual  statement  being
  6347. executed. <row> must be a number from 1 to 25. MSGLINE = 0  is  the  default
  6348. if the window was defined using CREATE TEXT_WINDOW, but MSGLINE = 25 is  the
  6349. default  for  the  PC/DOS  compatibility  window  provided  if  no  CREATE
  6350. TEXT_WINDOW is issued.
  6351.  
  6352. The SET TRACE ON/OFF Statement may be used to display  the  script  keyword,
  6353. line number, and source file name as each statement is executed  within  the
  6354. script.
  6355.  
  6356. SET TRACE_DELAY Statement may be used to specify an amount of time to  pause
  6357. between the execution of each script statement so the effect  will  look  as
  6358. if the script has been slowed down to permit easier observation of  a  trace
  6359. process. This statement works in conjunction with the SET TRACE Statement.
  6360.  
  6361. SET CAPTURE ON/OFF is used to control the capturing of asynchronous data  to
  6362. a  file  (only  supported  during  asynchronous  terminal  emulation).  All
  6363. captured data is placed into a file.    If  the  <filename>  option  is  not
  6364. specified, the name used is generated and it  is  placed  in  the  directory
  6365. specified  by  the  DATA_DIRECTORY  Customization  Variable  (usually
  6366. C:\TALKTHRU\DATA).  If the <filename> option is specified, it  must  be  the
  6367. fully qualified name of the file to receive the data.
  6368.  
  6369. The SET KEEP ON/OFF Statement is used to change the default KEEP option  for
  6370. the EXIT Statement. Normally an EXIT Statement without the KEEP option  will
  6371. release the script from  memory.  By  executing  a  SET  KEEP  ON  all  EXIT
  6372. Statements will keep the script in memory even  if  the  EXIT  Statement  is
  6373. specified  without  the  KEEP  option.  See  the  EXIT  Statement  for  more
  6374. information regarding the KEEP option.
  6375.  
  6376. SET NUMERIC_PRECISION and NUMERIC_FORMAT are  used  to  control  the  format
  6377. that numbers  take  when  converted  to  strings  (such  as  when  they  are
  6378. displayed). NUMERIC_PRECISION and  NUMERIC_FORMAT  have  no  effect  on  the
  6379. precision of calculations, they only affect the  conversion  of  numbers  to
  6380. strings.
  6381.  
  6382. The precision value on NUMERIC_PRECISION is equal to the maximum  number  of
  6383. digits after the decimal point that will be displayed.
  6384.  
  6385. The <value> on NUMERIC_FORMAT can be:
  6386.  
  6387.    1 ==>> Do not display trailing zeros after the decimal
  6388.    2 ==>> Display training zeros after the decimal
  6389.  
  6390. SET SEND_MNEMONIC ON allows keystroke mnemonics to  be  sent  via  the  SEND
  6391. Statement during EHLLAPI emulation. SET SEND_MNEMONIC OFF  causes  AUTOPILOT
  6392. to treat the @ character as an @, not as the start of a keystroke  mnemonic.
  6393. The default setting is OFF.
  6394.  
  6395. Below is a table containing the  valid  mnemonics  that  can  be  sent  with
  6396. SEND_MNEMONIC ON:
  6397.  
  6398.           A-Alt          I-Insert            Q-Finish(Quit)       
  6399.           B-Backtab      J-Jump              R-Reset              
  6400.           C-Clear        K-Copy              S-Shift              
  6401.           D-Delete Char  L-Left Cursor Move  T-Tab                
  6402.           E-Enter        M-Enlarge(Magnify)  U-Up Cursor Move     
  6403.           F-Erase Eof    N-New Line          V-Down Cursor Move   
  6404.           G-Not Used     O-Not Used          W->>Y-Not Used       
  6405.           H-Help         P-Print             Z-Right Cursor Move  
  6406.  
  6407.                     0  Home  7  PF7   e  PF14  l  PF21  
  6408.                     1  PF1   8  PF8   f  PF15  m  PF22  
  6409.                     2  PF2   9  PF9   g  PF16  n  PF23  
  6410.                     3  PF3   a  PF10  h  PF17  o  PF24  
  6411.                     4  PF4   b  PF11  i  PF18  x  PA1   
  6412.                     5  PF5   c  PF12  j  PF19  y  PA2   
  6413.                     6  PF6   d  PF13  k  PF20  z  PA3   
  6414.  
  6415. The  SET  TITLE_BAR,  DEFAULT_COLOR,  WINDOW_SIZE,  and  WINDOW_POSITION
  6416. Statements  are  used  to  modify  information  specified  in  the  CREATE
  6417. TEXT_WINDOW Statement.  See this statement for more information  on  meaning
  6418. and format.
  6419.  
  6420. The SET CURRENT_WINDOW Statement is used to indicate  which  window  defined
  6421. in the CREATE TEXT_WINDOW  Statements  is  to  receive  subsequent  DISPLAY,
  6422. PROMPT, COLOR, CLS, etc. Statements. <window-number> is the real  number  or
  6423. identifier used in the CREATE Statement.
  6424.  
  6425. The SET PULLDOWN/CHOICE formats allow you to dynamically modify  the  <text>
  6426. or ACTION associated with a PULLDOWN or CHOICE Action Bar Menu item.   Refer
  6427. to the CREATE Statement for more information on PULLDOWN and CHOICE.
  6428.  
  6429. WARNING:
  6430.      If multiple windows are being supported in an  AUTOPILOT  program,  the
  6431.      desired window must be the CURRENT_WINDOW  for  all  window  Statements
  6432.      and Functions to work.  See the SET CURRENT_WINDOW Statement  for  more
  6433.      information on how this is done.
  6434.  
  6435. The SET dialog-control ...  formats  are  used  to  dynamically  modify  the
  6436. following information regarding the specified dialog control:
  6437.  
  6438.   <text-string>
  6439.        The associated text string.  This IS ONLY VALID for  dialog  controls
  6440.        which have associated text strings.  If the text  associated  with  a
  6441.        dialog control refers to an ICON_FIELD the text string refers to  the
  6442.        name of the icon file.
  6443.   ACTION
  6444.        The associated ACTION.  This IS ONLY VALID for dialog controls  which
  6445.        have an associated ACTION.
  6446.   SIZE
  6447.        The size of the control.  The size can be specified  in  any  of  the
  6448.        ways indicated on the related  clause  in  the  CREATE  DIALOG_WINDOW
  6449.        Statement.
  6450.   AT
  6451.        The position of the control.  The position can be  specified  in  any
  6452.        of  the  ways  indicated  on  the  related  clause  in  the  CREATE
  6453.        DIALOG_WINDOW Statement.
  6454.  
  6455.  
  6456. The SET ACTION clause allows you to specify or modify the default action  to
  6457. occur if:
  6458.  
  6459.  o System Menu Close was requested
  6460.  o a PULLDOWN or CHOICE is requested with no associated ACTION
  6461.  o a dialog control (i.e.  PUSH_BUTTON)  is  activated  with  no  associated
  6462.    ACTION
  6463.  
  6464. The SET SESSION  formats  allows  you  to  modify  the  EHLLAPI  session  id
  6465. (<sessid>) being monitored by the specified session monitor.
  6466.  
  6467. The  SET  TEXT_WATCH  formats  allow  you  to  modify  the  specifics  of  a
  6468. TEXT_WATCH clause in a session monitor.
  6469.  
  6470. The SET HOST_KEY_WATCH formats allow  you  to  modify  the  specifics  of  a
  6471. HOST_KEY_WATCH clause in a session monitor.
  6472.  
  6473. If the IN SESSION_MONITOR clause  is  not  specified,  the  current  session
  6474. monitor will be used (the last  monitor  created  or  one  set  by  the  SET
  6475. CURRENT_MONITOR statement).
  6476.  
  6477. SET SEND_WAIT_TYPE  statement tells AUTOPILOT when to wait for the  keyboard
  6478. to be ready when doing a SEND statement..  The value of type may be:
  6479.  
  6480. type  Remarks
  6481. ────  ──────────────────────────────────────────────────────────────────────
  6482.  1    Wait until keyboard ready before doing a SEND only for the first  SEND
  6483.       following a WAIT FOR (default).
  6484.  2    Wait until keyboard ready before sending the first item in  each  SEND
  6485.       statement.
  6486.  3    Do not wait until keyboard ready before doing a SEND.
  6487.  
  6488. NOTE:
  6489.    'Wait for keyboard ready' takes  about  1/2  of  a  second  for  TalkThru
  6490.    sessions so performance can be improved by using type = 1  or  3.    Also
  6491.    note that prior to release 2.1, type = 2 was the default (and  there  was
  6492.    no way to change it).
  6493.  
  6494. Examples:
  6495.  
  6496.     SET MAXWAIT = 30 SECONDS
  6497.     SET x = 1 SET y = x + 1
  6498.     SET s = STR_LEFT(t,y)
  6499.     SET TRACE ON
  6500.     SET TRACE_DELAY = 2 seconds
  6501.     SET DISPLAY ON
  6502.  
  6503.     DIAL                  /* Dial the phone */
  6504.     WAIT FOR "CONNECT"        /* Wait for connection */
  6505.     LOOK FOR "CONNECT 1200"     /* 1200 baud number? */ 10
  6506.     IF FOUND         /* yes -- change baud rate */
  6507.  
  6508. See Also:
  6509.  
  6510.   GLOBAL
  6511.   STORE
  6512.  
  6513.  
  6514.  
  6515.  
  6516.                          12.89 SET_ARRAY Statement                          
  6517.  
  6518.  
  6519. Purpose:
  6520.  
  6521. 1. To quickly set the elements of an array to a specific value.
  6522.  
  6523. 2. To set a range of one array equal to a range of another array.
  6524.  
  6525.  
  6526. Format:
  6527.  
  6528.   ┌──────────────────────────────────────────────────────────────────────┐
  6529.   │ SET_ARRAY arrayname                                                  │
  6530.   │   [ ( [ FROM dim,... ] [ TO dim,... ] ) ]   = value                  │
  6531.   │                                                                      │
  6532.   │ SET_ARRAY arrayname                                                  │
  6533.   │   [ ( [ FROM dim,... ] [ TO dim,... ] ) ]                            │
  6534.   │     = arrayname [ ( [ FROM dim,... ] [ TO dim,... ] ) ]              │
  6535.   └──────────────────────────────────────────────────────────────────────┘
  6536.  
  6537. where:
  6538.  
  6539.  arrayname
  6540.       - may be a 1,2, or 3 dimensional array
  6541.  
  6542.  value
  6543.       - may be any string or numeric expression.
  6544.  
  6545.  FROM
  6546.       - optional clause defaults to the first element in the array
  6547.  
  6548.  TO
  6549.       - optional clause defaults to the last element in the array
  6550.  
  6551.  
  6552. Remarks:
  6553.  
  6554. Format 1 sets the elements of an array to a specified value. If no range  is
  6555. specified all the elements are set to the value. If a range is set then  all
  6556. the elements within the range are set. The FROM clause defines the  starting
  6557. indices and the TO clause defines the ending indices. Each  index  is  never
  6558. varied outside of the defined range. In the following example ...
  6559.  
  6560.   DIM myarray(10,5)
  6561.   SET_ARRAY myarray(FROM 2,3 TO 5,4) = 0
  6562.  
  6563. Elements (2,3), (2,4), (3,3), (3,4), (4,3), (4,4), (5,3),  and  (5,4)  would
  6564. all be set to 0. All other elements would remain unchanged.
  6565.  
  6566. Format 2 sets the elements of one array to the elements  of  another  array.
  6567. In the following example:
  6568.  
  6569.   DIM myarray1(10,5) DIM myarray2(10,5)
  6570.   SET_ARRAY myarray1 = myarray2
  6571.  
  6572. The array 'myarray1' is set equal to the array 'myarray2'. If the  range  of
  6573. the source array is smaller than the destination  array,  the  settings  are
  6574. repeated. For example:
  6575.  
  6576.   DIM myarray1(10,5)
  6577.   DIM myarray2(6,5)
  6578.  
  6579.   SET_ARRAY myarray1 = myarray2
  6580.  
  6581. Elements 1,1 through 6,5 of myarray1 are set equal to  the  array  myarray2.
  6582. Elements 7,1 through 10,5 of myarray1 are set equal
  6583. to elements 1,1 through 4,5 of myarray2.
  6584.  
  6585. The FROM and TO clauses may be used to specify specific  ranges.  Also  note
  6586. that the arrays do not have to have  the  same  amount  of  dimensions.  For
  6587. example:
  6588.  
  6589.   DIM myarray1(5,6)
  6590.   DIM myarray2(4) = "DOG", "CAT", "TIGER", "LION"
  6591.  
  6592.   SET_ARRAY myarray1(FROM 2,2 TO 4,4) = myarray2 FROM 1 TO 3
  6593.  
  6594. Array myarray1 would look like this:
  6595.  
  6596.                          0  0    0    0      0  0  
  6597.                          0  DOG  CAT  TIGER  0  0  
  6598.                          0  DOG  CAT  TIGER  0  0  
  6599.                          0  DOG  CAT  TIGER  0  0  
  6600.                          0  0    0    0      0  0  
  6601.  
  6602.  
  6603. See Also:
  6604.  
  6605. SEARCH_ARRAY
  6606.  
  6607.  
  6608.  
  6609.  
  6610.                             12.90 SHOW Statement                            
  6611.  
  6612.  
  6613. Purpose:
  6614.  
  6615. The SHOW Statement can be used to change the visibility state  of  a  window
  6616. or dialog item to visible.
  6617.  
  6618. Format:
  6619.  
  6620.   ┌──────────────────────────────────────────────────────────────────────┐
  6621.   │ SHOW {DIALOG_WINDOW(winid)  }                                        │
  6622.   │      {TEXT_WINDOW(winid) }                                           │
  6623.   │                                                                      │
  6624.   │ SHOW {TEXT_FIELD(id)       }                                         │
  6625.   │      {ENTRY_FIELD(id)      }                                         │
  6626.   │      {PUSH_BUTTON(id)      }                                         │
  6627.   │      {RADIO_BUTTON(id)     }                                         │
  6628.   │      {CHECK_BOX(id)       }                                          │
  6629.   │      {LIST_BOX(id)        }                                          │
  6630.   │      {COMBINATION_BOX(id)   }                                        │
  6631.   │      {GROUP_BOX(id)       }                                          │
  6632.   │      {ICON_FIELD(id)       }                                         │
  6633.   │      {MULTILINE_ENTRY_FIELD(id) }                                    │
  6634.   │        [ IN DIALOG_WINDOW(winid) ]                                   │
  6635.   └──────────────────────────────────────────────────────────────────────┘
  6636.  
  6637.  
  6638. Remarks:
  6639.  
  6640. A window or dialog is specified to  be  invisible  by  using  the  INVISIBLE
  6641. clause in the CREATE TEXT_WINDOW and CREATE DIALOG_WINDOW Statements  or  by
  6642. using the HIDE Statement.
  6643.  
  6644. See Also:
  6645.  
  6646.   CREATE DIALOG_WINDOW
  6647.   CREATE TEXT_WINDOW
  6648.   HIDE
  6649.  
  6650.  
  6651.  
  6652.  
  6653.                            12.91 SIGNAL Statement                           
  6654.  
  6655.  
  6656. Purpose:
  6657.  
  6658. Triggers a predefined condition.
  6659.  
  6660. Format:
  6661.  
  6662.   ┌──────────────────────────────────────────────────────────────────────┐
  6663.   │ SIGNAL   {TIMEOUT }                                                  │
  6664.   │          {ESCAPE  }                                                  │
  6665.   └──────────────────────────────────────────────────────────────────────┘
  6666.  
  6667. Remarks:
  6668.  
  6669. If a condition is triggered and trapping is enabled (see the ON  Statement),
  6670. control is transferred to the appropriate routine, otherwise the  script  is
  6671. canceled.
  6672.  
  6673. Example:
  6674.  
  6675.     WAIT FOR "TalkThru" AFTER 90 SECONDS SIGNAL TIMEOUT
  6676.  
  6677. See Also:
  6678.  
  6679.   ON
  6680.   RESUME
  6681.  
  6682.  
  6683.  
  6684.  
  6685.                             12.92 SORT Statement                            
  6686.  
  6687.  
  6688. Purpose:
  6689.  
  6690. Sort an array.
  6691.  
  6692. Format:
  6693.  
  6694.   ┌──────────────────────────────────────────────────────────────────────┐
  6695.   │ SORT array [ FROM start_row ] [ TO end_row ]                         │
  6696.   │                  [ USING option-str ]                                │
  6697.   └──────────────────────────────────────────────────────────────────────┘
  6698.  
  6699. Remarks:
  6700.  
  6701. SORT is used to rearrange the elements in an array into a  specified  order.
  6702. One and two dimensional arrays may be sorted on  up  to  8  "sort  keys"  in
  6703. ascending or descending order.
  6704.  
  6705. For the purposes of SORT an array can be thought of as a table  made  up  of
  6706. horizontal rows and vertical columns. The first  dimension  in  the  array's
  6707. DIM Statement specifies the number  of  rows  in  the  array.    The  second
  6708. dimension specifies the number of columns. A one dimensional array  has  one
  6709. column. SORT rearranges rows -- the columns remain intact.
  6710.  
  6711. The primary-sort-column is the column that SORT uses to  determine  the  new
  6712. order for  the  rows.  Rows  are  rearranged  so  that  the  values  in  the
  6713. primary-sort-column appear in either ascending or descending order.   Up  to
  6714. 7 additional columns may be selected as secondary-sort-columns.    They  are
  6715. used to break ties that occur  when  two  or  more  records  have  the  same
  6716. entries in the primary-sort-column.
  6717.  
  6718. SORT rearranges all the rows in an array within a  range  specified  by  the
  6719. FROM and TO keywords. Rows outside of this range are not disturbed.  If  the
  6720. FROM clause is omitted, the sort starts  from  the  first  row.  If  the  TO
  6721. clause is omitted the sort ends with the last row.
  6722.  
  6723. The USING option-str clause determines the method in which  the  array  will
  6724. be sorted. The option-str is a string value that consists  of  a  series  of
  6725. sort options. The sort options are specified as follows:
  6726.  
  6727. Sort Option  Name           Meaning
  6728. ───────────  ─────────────  ────────────────────────────────────────────────
  6729.     Cn       Column Select  Specifies that column "n" should be  used  as  a
  6730.                             sort key. The remaining sort  options  apply  to
  6731.                             this column until a new Cn option is  specified.
  6732.                             If option-str does not start with a Cn  option,,
  6733.                             column 1 will be used. Up to 8  columns  may  be
  6734.                             specified in a sort.
  6735.     A        Ascending      Sort is in ascending  order  for  the  specified
  6736.                             column. This is the default.
  6737.     D        Descending     Sort is in descending order  for  the  specified
  6738.                             column.
  6739.     T1       ASCII          Sort is done using the  ASCII  collating  order.
  6740.                             If an element in an array  is  a  number  it  is
  6741.                             converted to a string for the  purposes  of  the
  6742.                             sort.
  6743.     T2       Dictionary     Specifies that upper and lower case  is  ignored
  6744.                             during the sort. If an element   in an array  is
  6745.                             a number it is converted to  a  string  for  the
  6746.                             purposes of the sort.
  6747.     T3       Numeric        Sort in numeric order.  If  an  element  in  the
  6748.                             array is a string it is converted  to  a  number
  6749.                             for the purposes of the sort.
  6750.     On       Offset n       Specifies that the comparison of  each  item  to
  6751.                             be sorted should  begin  at  character  position
  6752.                             "n". The default is  1.  This  only  applies  to
  6753.                             ASCII and Dictionary sorts.
  6754.  
  6755.  
  6756. Examples:
  6757.  
  6758. Given the following array:
  6759.      DIM array[3,3] =  "apple", "cat", 2
  6760.                        "orange", "dog", 2
  6761.                        "grape", "bird",  3.2
  6762.  
  6763. Sort the array in ascending order on column 1:
  6764.  
  6765.  AUTOPILOT code            Returns:
  6766.  
  6767.  SORT array                "apple", "cat", 2
  6768.                            "grape", "bird", 3.2
  6769.                            "orange", "dog", 2
  6770.  
  6771. Sort the array in ascending order on column 2:
  6772.  
  6773.  AUTOPILOT code            Returns:
  6774.  
  6775.  SORT array USING "C2"     "grape", "bird", 3.2
  6776.                            "apple", "cat", 2
  6777.                            "orange", "dog", 2
  6778.  
  6779. Sort the array in descending order, using a numeric sort, on column  3.  For
  6780. items with the same column three value, sort in descending order  on  column
  6781. 2.
  6782.  
  6783.  AUTOPILOT code                 Returns:
  6784.  
  6785.  SORT array  USING "C3T3DC2D"   "grape", "bird", 3.2
  6786.                                 "orange", "dog", 2
  6787.                                 "apple", "cat", 2
  6788.  
  6789. See Also:
  6790.  
  6791.   DIM
  6792.  
  6793.  
  6794.  
  6795.  
  6796.                            12.93 STORE Statement                            
  6797.  
  6798.  
  6799. Purpose:
  6800.  
  6801. This statement will store data in the TalkThru default area in memory.
  6802.  
  6803. Format:
  6804.  
  6805.   ┌──────────────────────────────────────────────────────────────────────┐
  6806.   │ STORE <string-1> AS <string-2>                                       │
  6807.   └──────────────────────────────────────────────────────────────────────┘
  6808.  
  6809. Remarks:
  6810.  
  6811. This statement stores <string-1> of data in the  TalkThru  default  area  in
  6812. memory as the variable name <string-2>. It can be used  to  modify  TalkThru
  6813. defaults or as a general method of storing things  for  an  entire  TalkThru
  6814. session.
  6815.  
  6816. The same thing can be done from a menu or  file  selection  screen  via  the
  6817. .VSET command.
  6818.  
  6819. The function STR_RETRIEVE can be used to find a value in the default area.
  6820.  
  6821. Examples:
  6822.  
  6823. The following example would modify the default DATA_DIRECTORY:
  6824.  
  6825.     STORE "C:\TALKTHRU\DATA" AS "DATA_DIRECTORY"
  6826.  
  6827. The following syntax prompts for a password if one is not already set.
  6828.  
  6829.     SET password = STR_RETRIEVE("DATA_PASSWORD")
  6830.     IF NOT password
  6831.       BEGIN
  6832.         PROMPT "Enter Password " password(8)
  6833.         STORE password AS "DATA_PASSWORD"
  6834.       END
  6835.     SEND password, ENTER
  6836.  
  6837. See Also:
  6838.  
  6839.   SET
  6840.  
  6841.  
  6842.  
  6843.  
  6844.                            12.94 STR_CHR Function                           
  6845.  
  6846.  
  6847. Purpose:
  6848.  
  6849. Converts an ASCII code to its character equivalent.
  6850.  
  6851. Format:
  6852.  
  6853.   ┌──────────────────────────────────────────────────────────────────────┐
  6854.   │ STR_CHR(<num>)                                                       │
  6855.   └──────────────────────────────────────────────────────────────────────┘
  6856.  
  6857. Remarks:
  6858.  
  6859. This is used to convert an ASCII code to its  character  equivalent.  Should
  6860. be in the range from 1 to 255.
  6861.  
  6862. Example:
  6863.  
  6864.     set x = STR_CHR(65)
  6865.  
  6866. In this example, 'x' would be set to "A".
  6867.  
  6868.  
  6869.  
  6870.  
  6871.                          12.95 STR_CURRDIR Function                         
  6872.  
  6873.  
  6874. Purpose:
  6875.  
  6876. Get the current OS/2 Directory.
  6877.  
  6878. Format:
  6879.  
  6880.   ┌──────────────────────────────────────────────────────────────────────┐
  6881.   │ STR_CURRDIR                                                          │
  6882.   └──────────────────────────────────────────────────────────────────────┘
  6883.  
  6884. Remarks:
  6885.  
  6886. Returns the OS/2 current directory. Leading  and  trailing  backslashes  are
  6887. not included.
  6888.  
  6889. Example:
  6890.  
  6891. If the current drive/directory is C:\WP
  6892.  
  6893.     STR_CURRDIR returns "C:\WP"
  6894.  
  6895. If the current drive/directory is C:\WP\DOC
  6896.  
  6897.     STR_CURRDIR returns "C:\WP\DOC"
  6898.  
  6899. If the current drive/directory is C:\ (root directory)
  6900.  
  6901.     STR_CURRDIR returns "" (null string)
  6902.  
  6903. See Also:
  6904.  
  6905.   SWAP
  6906.  
  6907.  
  6908.  
  6909.  
  6910.                         12.96 STR_CURRDISK Function                         
  6911.  
  6912.  
  6913. Purpose:
  6914.  
  6915. Get the current OS/2 Drive.
  6916.  
  6917. Format:
  6918.  
  6919.   ┌──────────────────────────────────────────────────────────────────────┐
  6920.   │ STR_CURRDISK                                                         │
  6921.   └──────────────────────────────────────────────────────────────────────┘
  6922.  
  6923. Remarks:
  6924.  
  6925. Returns a 1 character string containing the current drive letter.
  6926.  
  6927. Example:
  6928.  
  6929. If the current drive/directory is C:\WP
  6930.  
  6931.     set x = STR_CURRDISK
  6932.  
  6933. returns "C"
  6934.  
  6935. See Also:
  6936.  
  6937.   SWAP
  6938.  
  6939.  
  6940.  
  6941.  
  6942.                           12.97 STR_DATE Function                           
  6943.  
  6944.  
  6945. Purpose:
  6946.  
  6947. Converts date information into various formats.
  6948.  
  6949. Format:
  6950.  
  6951.   ┌──────────────────────────────────────────────────────────────────────┐
  6952.   │ STR_DATE(n)                                                          │
  6953.   │                                                                      │
  6954.   │    or                                                                │
  6955.   │                                                                      │
  6956.   │ STR_DATE(n,datetime)                                                 │
  6957.   │                                                                      │
  6958.   │  where: n = 1 ==>> yymmdd                                            │
  6959.   │             2 ==>> mm/dd/yy                                          │
  6960.   │             3 ==>> mm-dd-yy                                          │
  6961.   │             4 ==>> MMM dd, YYYY                                      │
  6962.   │             5 ==>> Mm...m dd, YYYY                                   │
  6963.   │             6 ==>> dd MMM YY                                         │
  6964.   │             7 ==>> dd MMM YYYY                                       │
  6965.   │                                                                      │
  6966.   │  datetime ==>> timestamp returned by DIR Statement.                  │
  6967.   └──────────────────────────────────────────────────────────────────────┘
  6968.  
  6969. Remarks:
  6970.  
  6971. Format 1 is used to return the system date in the format specified.
  6972.  
  6973. Format 2 has been added primarily to support conversion of  the  date  value
  6974. returned by the DIR Statement.
  6975.  
  6976. See Also:
  6977.  
  6978.   STR_TIME
  6979.  
  6980.  
  6981.  
  6982.  
  6983.                          12.98 STR_DELETE Function                          
  6984.  
  6985.  
  6986. Purpose:
  6987.  
  6988. Deletes characters from a string
  6989.  
  6990. Format:
  6991.  
  6992.   ┌──────────────────────────────────────────────────────────────────────┐
  6993.   │ STR_DELETE( source_str , start_num , len_num )                       │
  6994.   └──────────────────────────────────────────────────────────────────────┘
  6995.  
  6996. Remarks:
  6997.  
  6998. STR_DELETE is  used  to  delete  len_num  characters  starting  at  position
  6999. start_num in string source_str.
  7000.  
  7001. Example:
  7002.  
  7003.   STR_DELETE("ABCDE",1,1)  ; returns "BCDE"
  7004.   STR_DELETE("ABCDE",2,2)  ; returns "ADE"
  7005.   STR_DELETE("ABCDE",5,1)  ; returns "ABCD"
  7006.   STR_DELETE("ABCDE",1,6)  ; returns ""
  7007.  
  7008.  
  7009.  
  7010.  
  7011.                        12.99 STR_ENVIRONMENT Function                       
  7012.  
  7013.  
  7014. Purpose:
  7015.  
  7016. Obtains a variable from the OS/2 environment area.
  7017.  
  7018. Format:
  7019.  
  7020.   ┌──────────────────────────────────────────────────────────────────────┐
  7021.   │ STR_ENVIRONMENT("name")                                              │
  7022.   └──────────────────────────────────────────────────────────────────────┘
  7023.  
  7024. Remarks:
  7025.  
  7026. This function searches the OS/2 environment area for an entry in the form:
  7027.  
  7028.     name=var
  7029.  
  7030. where name is the string value passed to the  function.  If  such  an  entry
  7031. exists, the function returns the string value var. If no entry  exists,  var
  7032. is set to "" (null string).This can be used  to  obtain  information  loaded
  7033. through the CONFIG.SYS File.
  7034.  
  7035. WARNING:
  7036.      STR_ENVIRONMENT is case sensitive.  Be sure that "name" is in the  same
  7037.      case as the variable in the environment area.
  7038.  
  7039. Example:
  7040.  
  7041.     STR_ENVIRONMENT("PATH")
  7042.             /* returns "C:\TALKTHRU\PROGRAMS;C:\OS/2" */
  7043.  
  7044.  
  7045.  
  7046.  
  7047.                         12.100 STR_FILEPATH Function                        
  7048.  
  7049.  
  7050. Purpose:
  7051.  
  7052. Returns a component of a file path.
  7053.  
  7054. Format:
  7055.  
  7056.   ┌──────────────────────────────────────────────────────────────────────┐
  7057.   │ STR_FILEPATH (path_str, type)                                        │
  7058.   └──────────────────────────────────────────────────────────────────────┘
  7059.  
  7060. Remarks:
  7061.  
  7062. STR_FILEPATH is used to extract the  selected  components  of  a  file  path
  7063. string. type refers to the component to be extracted. Values of type are:
  7064.  
  7065. Type  Description
  7066. ────  ──────────────────────────────────────────────────────────────────────
  7067.  1    Returns the drive letter followed by a colon if a drive  is  specified
  7068.       in path_str.
  7069.  2    Returns the path of subdirectories,, if any,, including  the  trailing
  7070.       slash.
  7071.  3    Returns the base file name without any extension.
  7072.  4    Returns the file name  extension,,  if  any,,  including  the  leading
  7073.       period.
  7074.  
  7075. A null string is returned if the chosen component is not in path-str.
  7076.  
  7077.  
  7078. Examples:
  7079.  
  7080.     SET my_path = "C:\TALKTHRU\SCRIPTS\TEST.SCR"
  7081.     STR_FILEPATH(my_path,1)     ; Returns "C:"
  7082.     STR_FILEPATH(my_path,2)     ; Returns "\TALKTHRU\SCRIPTS\"
  7083.     STR_FILEPATH(my_path,3)     ; Returns "TEST"
  7084.     STR_FILEPATH(my_path,4)     ; Returns ".SCR"
  7085.  
  7086.  
  7087.  
  7088.  
  7089.  
  7090.                          12.101 STR_JLEFT Function                          
  7091.  
  7092.  
  7093. Purpose:
  7094.  
  7095. Left justifies a string.
  7096.  
  7097. Format:
  7098.  
  7099.   ┌──────────────────────────────────────────────────────────────────────┐
  7100.   │ STR_JLEFT(<string>)                                                  │
  7101.   └──────────────────────────────────────────────────────────────────────┘
  7102.  
  7103. Remarks:
  7104.  
  7105. This function is used to return a left justified string value.
  7106.  
  7107. Example:
  7108.  
  7109.     STR_JLEFT("   XYZ   ")   ; returns "XYZ      "
  7110.  
  7111.  
  7112.  
  7113.  
  7114.                          12.102 STR_JRIGHT Function                         
  7115.  
  7116.  
  7117. Purpose:
  7118.  
  7119. Right justifies a string.
  7120.  
  7121. Format:
  7122.  
  7123.   ┌──────────────────────────────────────────────────────────────────────┐
  7124.   │ STR_RIGHT(<string>)                                                  │
  7125.   └──────────────────────────────────────────────────────────────────────┘
  7126.  
  7127. Remarks:
  7128.  
  7129. This function is used to return a right justified string value.
  7130.  
  7131. Example:
  7132.  
  7133.     STR_JRIGHT("   XYZ   ")   ; returns "      XYZ"
  7134.  
  7135.  
  7136.  
  7137.  
  7138.                           12.103 STR_LEFT Function                          
  7139.  
  7140.  
  7141. Purpose:
  7142.  
  7143. Returns the leftmost n characters of a string.
  7144.  
  7145. Format:
  7146.  
  7147.   ┌──────────────────────────────────────────────────────────────────────┐
  7148.   │ STR_LEFT(<string>,<number>)                                          │
  7149.   └──────────────────────────────────────────────────────────────────────┘
  7150.  
  7151. Remarks:
  7152.  
  7153. <string>
  7154.       is any string.
  7155.  
  7156. <number>
  7157.       is a number that specifies the number of characters which  are  to  be
  7158.       in the result.
  7159.  
  7160. If <number> is greater than  the  number  of  characters  in  <string>,  the
  7161. entire string is returned. If <number> <= 0, the null string  (length  zero)
  7162. is returned.
  7163.  
  7164. Examples:
  7165.  
  7166.     SET a = "ANY STRING"
  7167.     SET b = STR_LEFT(a,3)
  7168.  
  7169. This example would set b to equal the string "ANY".
  7170.  
  7171.     SET num = 7
  7172.     DISPLAY STR_LEFT("TEXT TO BE DISPLAYED", num)
  7173.  
  7174. This example would display "TEXT TO" on the screen.
  7175.  
  7176. See Also:
  7177.  
  7178.   STR_MID
  7179.   STR_RIGHT
  7180.  
  7181.  
  7182.  
  7183.  
  7184.                          12.104 STR_LOWER Function                          
  7185.  
  7186.  
  7187. Purpose:
  7188.  
  7189. Converts upper case characters to lower case characters.
  7190.  
  7191. Format:
  7192.  
  7193.   ┌──────────────────────────────────────────────────────────────────────┐
  7194.   │ STR_LOWER(<string>)                                                  │
  7195.   └──────────────────────────────────────────────────────────────────────┘
  7196.  
  7197. Remarks:
  7198.  
  7199. This function is used to return a string with all alphabetic  characters  in
  7200. lower case.
  7201.  
  7202. See Also:
  7203.  
  7204.   STR_UPPER
  7205.  
  7206.  
  7207.  
  7208.  
  7209.                           12.105 STR_MID Function                           
  7210.  
  7211.  
  7212. Purpose:
  7213.  
  7214. Returns the requested part of a string.
  7215.  
  7216. Format:
  7217.  
  7218.   ┌──────────────────────────────────────────────────────────────────────┐
  7219.   │ STR_MID(<string>,<n>,<m>)                                            │
  7220.   └──────────────────────────────────────────────────────────────────────┘
  7221.  
  7222. Remarks:
  7223.  
  7224. <string>
  7225.      is any string.
  7226.  
  7227. <n>
  7228.      is a number that specifies the position of the starting character  that
  7229.      is to be returned.
  7230.  
  7231. <m>
  7232.      is a number that specifies the number of characters which are to be  in
  7233.      the result.
  7234.  
  7235. The function returns  a  string  of  length  <m>  characters  from  <string>
  7236. beginning with the <n>th character.
  7237.  
  7238. If <m> is greater than the  number  of  characters  left  in  <string>,  the
  7239. rightmost characters beginning with the <n>th character are returned.
  7240.  
  7241. If <m> <= 0 or <n> > the length of <string>, the null string  (length  zero)
  7242. is returned.
  7243.  
  7244. Examples:
  7245.  
  7246.     SET a = "ANY STRING"
  7247.     SET b = STR_MID(a,5,3)
  7248.  
  7249. This example would set b to equal the string "STR".
  7250.  
  7251.     SET num = 7
  7252.     DISPLAY STR_MID("TEXT TO BE DISPLAYED", 5, num)
  7253.  
  7254. This example would display " TO BE " on the screen.
  7255.  
  7256. See Also:
  7257.  
  7258.   STR_LEFT
  7259.   STR_RIGHT
  7260.  
  7261.  
  7262.  
  7263.  
  7264.                           12.106 STR_PAD Function                           
  7265.  
  7266.  
  7267. Purpose:
  7268.  
  7269. Returns a string padded with a specific character.
  7270.  
  7271. Format:
  7272.  
  7273.   ┌──────────────────────────────────────────────────────────────────────┐
  7274.   │ STR_PAD(<string-1>,<string-2>,<n> [,<type-num>] )                    │
  7275.   └──────────────────────────────────────────────────────────────────────┘
  7276.  
  7277. Remarks:
  7278.  
  7279. <string-1> is padded with the first character of <string-2> up to  a  length
  7280. of <n>. Padding is determined by the optional parameter  type-num.  type-num
  7281. has the following meanings:
  7282.  
  7283.    1 ==>> Pad on the right
  7284.    2 ==>> Pad on the left
  7285.    3 ==>> Pad on both sides, thus centering string-1
  7286.  
  7287. The default type-num is 1.
  7288.  
  7289. If n is less than the length of string-1, no padding will occur.
  7290.  
  7291. Examples:
  7292.  
  7293.     STR_PAD("ABCDE", " ", 10)  ; returns "ABCDE     "
  7294.  
  7295.     STR_PAD("ABCDE", " ", 3)  ; returns "ABCDE"
  7296.  
  7297.     STR_PAD("ABCDE", "XYZ", 7)   ; returns "ABCDEXX"
  7298.     STR_PAD("ABCDE", "X", 11 , 1)  ; returns "ABCDEXXXXXXX"
  7299.     STR_PAD("ABCDE", "X", 11 , 2)  ; returns "XXXXXXABCDE"
  7300.     STR_PAD("ABCDE", "X", 11 , 3)  ; returns "XXXABCDEXXX"
  7301.  
  7302. See Also:
  7303.  
  7304.   STR_REPLICATE
  7305.   STR_TRUNCATE
  7306.  
  7307.  
  7308.  
  7309.  
  7310.                        12.107 STR_REPLICATE Function                        
  7311.  
  7312.  
  7313. Purpose:
  7314.  
  7315. To create large string patterns.
  7316.  
  7317. Format:
  7318.  
  7319.   ┌──────────────────────────────────────────────────────────────────────┐
  7320.   │ STR_REPLICATE(<string>, <n> )                                        │
  7321.   └──────────────────────────────────────────────────────────────────────┘
  7322.  
  7323. Remarks:
  7324.  
  7325. Returns <string> replicated <n> times.
  7326.  
  7327. Examples:
  7328.  
  7329.     STR_REPLICATE("*", 10)   ; returns "**********"
  7330.  
  7331.     STR_REPLICATE("ABC", 3)  ; returns "ABCABCABC"
  7332.  
  7333. See Also:
  7334.  
  7335.   STR_PAD
  7336.  
  7337.  
  7338.  
  7339.  
  7340.                         12.108 STR_RETRIEVE Function                        
  7341.  
  7342.  
  7343. Purpose:
  7344.  
  7345. Returns the value of a  keyword  within  the  TalkThru  Customization  File.
  7346. Refer to the Chapter, The TalkThru Customization File for  more  information
  7347. on Customization Variables and how they are updated.
  7348.  
  7349. Format:
  7350.  
  7351.   ┌──────────────────────────────────────────────────────────────────────┐
  7352.   │ STR_RETRIEVE(<string>)                                               │
  7353.   └──────────────────────────────────────────────────────────────────────┘
  7354.  
  7355. Remarks:
  7356.  
  7357. <string>
  7358.      is equal to a keyword in the TalkThru Customization File.
  7359.  
  7360. If <string> is found in the Customization File, the characters to the  right
  7361. of the equals sign in the Customization File are returned.  If  <string>  is
  7362. not found, the null string (length zero) is returned.  This function can  be
  7363. used in conjunction with the STORE Statement as a message passing facility.
  7364.  
  7365. In  searching  for  <string>  within  the  Customization  File,  case  is
  7366. insignificant.
  7367.  
  7368. NOTE:
  7369.     The Customization File is loaded into memory when TalkThru is  executed.
  7370.     IF you make a change to the Customization File, you must  exit  TalkThru
  7371.     and then reenter before the change will take place.
  7372.  
  7373. Examples:
  7374.  
  7375. Assume the TalkThru Customization File had this line in it ...
  7376.  
  7377.     DATA_DIRECTORY=C:\TALKTHRU\DATA
  7378.  
  7379. This example would set x to equal the string "C:\TALKTHRU\DATA".
  7380.  
  7381.     SET x = STR_RETRIEVE("DATA_DIRECTORY")
  7382.  
  7383. See Also:
  7384.  
  7385.   STORE
  7386.  
  7387.  
  7388.  
  7389.  
  7390.                          12.109 STR_RIGHT Function                          
  7391.  
  7392.  
  7393. Purpose:
  7394.  
  7395. Returns the rightmost n characters of a string.
  7396.  
  7397. Format:
  7398.  
  7399.   ┌──────────────────────────────────────────────────────────────────────┐
  7400.   │ STR_RIGHT(<string>,<number>)                                         │
  7401.   └──────────────────────────────────────────────────────────────────────┘
  7402.  
  7403. Remarks:
  7404.  
  7405. <string>
  7406.      is any string.
  7407.  
  7408. <number>
  7409.      is a number that specifies the number of characters which are to be  in
  7410.      the result.
  7411.  
  7412. If <number> is greater than  the  number  of  characters  in  <string>,  the
  7413. entire string is returned. If <number> <= 0, the null string  (length  zero)
  7414. is returned.
  7415.  
  7416. Examples:
  7417.  
  7418.     SET a = "ANY STRING"
  7419.     SET b = STR_RIGHT(a,3)
  7420.  
  7421. This example would set b to equal the string "ING".
  7422.  
  7423.     SET num = 9
  7424.     DISPLAY STR_RIGHT("TEXT TO BE DISPLAYED", num)
  7425.  
  7426. This example would display "DISPLAYED" on the screen.
  7427.  
  7428. See Also:
  7429.  
  7430.   STR_LEFT
  7431.   STR_MID
  7432.  
  7433.  
  7434.  
  7435.  
  7436.                           12.110 STR_TIME Function                          
  7437.  
  7438.  
  7439. Purpose:
  7440.  
  7441. Converts time information into various formats.
  7442.  
  7443. Format:
  7444.  
  7445.   ┌──────────────────────────────────────────────────────────────────────┐
  7446.   │ STR_TIME(n)                                                          │
  7447.   │                                                                      │
  7448.   │   or                                                                 │
  7449.   │                                                                      │
  7450.   │ STR_TIME(n,datetime)                                                 │
  7451.   │                                                                      │
  7452.   │  where : n = 1 ==>> hhmmss                                           │
  7453.   │              2 ==>> hh:mm:ss                                         │
  7454.   │              3 ==>> hhmmssdd                                         │
  7455.   │              4 ==>> hh:mm:ss.dd                                      │
  7456.   │              5 ==>> hh:mm                                            │
  7457.   │              6 ==>> h:mm:ss pp                                       │
  7458.   │              7 ==>> hh:mm pp                                         │
  7459.   │                                                                      │
  7460.   │  datetime ==>>  timestamp returned by DIR Statement.                 │
  7461.   └──────────────────────────────────────────────────────────────────────┘
  7462.  
  7463. Remarks:
  7464.  
  7465. Format 1 is used to return the system time in the format specified.
  7466.  
  7467. Format 2 has been added primarily to support conversion of  the  time  value
  7468. returned by the DIR Statement.
  7469.  
  7470. See Also:
  7471.  
  7472.   STR_DATE
  7473.  
  7474.  
  7475.  
  7476.  
  7477.                        12.111 STR_TRANSLATE Function                        
  7478.  
  7479.  
  7480. Purpose:
  7481.  
  7482. Returns a string with specified characters translated.
  7483.  
  7484. Format:
  7485.  
  7486.   ┌──────────────────────────────────────────────────────────────────────┐
  7487.   │ STR_TRANSLATE(<string-1> , <string-2> , <string-3> )                 │
  7488.   └──────────────────────────────────────────────────────────────────────┘
  7489.  
  7490. Remarks:
  7491.  
  7492. Every character in string-2 that is found in string-1 is translated  to  the
  7493. corresponding character in string-3.
  7494.  
  7495. The STR_TRANSLATE Function is case sensitive.
  7496.  
  7497. Examples:
  7498.  
  7499.     STR_TRANSLATE("Hello","abcde","12345") ; returns "H5llo"
  7500.     STR_TRANSLATE("Hello","lh","XY")     ; returns "HeXXo"
  7501.  
  7502.  
  7503.  
  7504.  
  7505.                         12.112 STR_TRUNCATE Function                        
  7506.  
  7507.  
  7508. Purpose:
  7509.  
  7510. This function will truncate trailing spaces.
  7511.  
  7512. Format:
  7513.  
  7514.   ┌──────────────────────────────────────────────────────────────────────┐
  7515.   │ STR_TRUNCATE(<string>)                                               │
  7516.   └──────────────────────────────────────────────────────────────────────┘
  7517.  
  7518. Remarks:
  7519.  
  7520. Returns the value of <string> without any trailing spaces.
  7521.  
  7522. Examples:
  7523.  
  7524.     STR_TRUNCATE(" XYZ     ")   ; returns " XYZ"
  7525.  
  7526. See Also:
  7527.  
  7528.   STR_PAD
  7529.  
  7530.  
  7531.  
  7532.  
  7533.                          12.113 STR_UPPER Function                          
  7534.  
  7535.  
  7536. Purpose:
  7537.  
  7538. Converts lower case characters to upper case characters.
  7539.  
  7540. Format:
  7541.  
  7542.   ┌──────────────────────────────────────────────────────────────────────┐
  7543.   │ STR_UPPER(<string>)                                                  │
  7544.   └──────────────────────────────────────────────────────────────────────┘
  7545.  
  7546. Remarks:
  7547.  
  7548. This function is used to return a string with all alphabetic  characters  in
  7549. upper case.
  7550.  
  7551. See Also:
  7552.  
  7553.   STR_LOWER
  7554.  
  7555.  
  7556.  
  7557.  
  7558.                           12.114 STR_VAL Function                           
  7559.  
  7560.  
  7561. Purpose:
  7562.  
  7563. Converts a number to a string.
  7564.  
  7565. Format:
  7566.  
  7567.   ┌──────────────────────────────────────────────────────────────────────┐
  7568.   │ STR_VAL(<value> [,radix] )                                           │
  7569.   └──────────────────────────────────────────────────────────────────────┘
  7570.  
  7571. Remarks:
  7572.  
  7573. STR_VAL converts the number value to a string. The optional  argument  radix
  7574. specifies the base of value. The default radix is 10.  If  specified,  radix
  7575. must be in the range 2-36. If  radix  is  10  (the  default)  and  value  is
  7576. negative, the first character of the stored string is the minus sign.
  7577.  
  7578. Examples:
  7579.  
  7580.     STR_VAL(10) returns "10"
  7581.     STR_VAL(10,2) returns "1010"
  7582.  
  7583.  
  7584.  
  7585.  
  7586.                            12.115 SWAP Statement                            
  7587.  
  7588.  
  7589. Purpose:
  7590.  
  7591. Switches the values of two variables.
  7592.  
  7593. Format:
  7594.  
  7595.   ┌──────────────────────────────────────────────────────────────────────┐
  7596.   │ SWAP <variable-1> [,] <variable-2>                                   │
  7597.   └──────────────────────────────────────────────────────────────────────┘
  7598.  
  7599. Remarks:
  7600.  
  7601. The value of <variable-2> is assigned  to  <variable-1>  and  the  value  of
  7602. <variable-1> is assigned to <variable-2>.
  7603.  
  7604.     SWAP A,B
  7605.  
  7606. is equivalent to:
  7607.  
  7608.     SET C = A
  7609.     SET A = B
  7610.     SET B = C
  7611.  
  7612. except that SWAP is much faster.
  7613.  
  7614. Example:
  7615.  
  7616.     IF array(i)  < array(i+1)
  7617.       SWAP array(i) , array(i+1)
  7618.  
  7619.  
  7620.  
  7621.  
  7622.                           12.116 TEXT_OF Function                           
  7623.  
  7624.  
  7625. Purpose:
  7626.  
  7627. The TEXT_OF Function returns the text associated with a  dialog  control  or
  7628. menu item.
  7629.  
  7630. Format:
  7631.  
  7632.   ┌──────────────────────────────────────────────────────────────────────┐
  7633.   │ TEXT_OF ( {TEXT_FIELD(id)   }                                        │
  7634.   │           {ENTRY_FIELD(id)   }                                       │
  7635.   │           {PUSH_BUTTON(id)  }                                        │
  7636.   │           {RADIO_BUTTON(id)  }                                       │
  7637.   │           {CHECK_BOX(id)   }                                         │
  7638.   │           {GROUP_BOX(id)   }                                         │
  7639.   │               [ IN DIALOG_WINDOW(winid) ]  )                         │
  7640.   │                                                                      │
  7641.   │ TEXT_OF ( {LIST_BOX(id)        }                                     │
  7642.   │           {COMBINATION_BOX(id)    }                                  │
  7643.   │           {MULTILINE_ENTRY_FIELD(id) }                               │
  7644.   │              [ IN DIALOG_WINDOW(winid) ]                             │
  7645.   │                [ ,<lineno> ]          )                              │
  7646.   │                                                                      │
  7647.   │ TEXT_OF ( {CHOICE(id)   } [IN DIALOG_WINDOW(winid) ]                 │
  7648.   │           {PULLDOWN(id) } [IN TEXT_WINDOW(winid)   ] )               │
  7649.   └──────────────────────────────────────────────────────────────────────┘
  7650.  
  7651. Remarks:
  7652.  
  7653. The optional <lineno> parameter is used  for  LIST_BOXes,  COMBINATION_BOXes
  7654. and MULTILINE_ENTRY_FIELDs to return a specific line. The default is line  1
  7655. for  LIST_BOXes  and  MULTILINE_ENTRY_FIELDs.  The  default  for
  7656. COMBINATION_BOXes is to return the text in the entry field  portion  of  the
  7657. COMBINATION_BOX (lineno = 0 will also do this).
  7658.  
  7659. See Also:
  7660.  
  7661.   CREATE TEXT_WINDOW
  7662.   CREATE DIALOG_WINDOW
  7663.   SELECTED_LINE
  7664.  
  7665.  
  7666.  
  7667.  
  7668.                           12.117 UNCHECK Statement                          
  7669.  
  7670.  
  7671. Purpose:
  7672.  
  7673. The UNCHECK Statement allows the script to  remove  a  check  mark  from  in
  7674. front of a menu CHOICE or to "uncheck" a RADIO_BUTTON  or  CHECK_BOX  dialog
  7675. control.
  7676.  
  7677. Format:
  7678.  
  7679.   ┌──────────────────────────────────────────────────────────────────────┐
  7680.   │ UNCHECK {RADIO_BUTTON(id) }                                          │
  7681.   │         {CHECK_BOX(id)    }                                          │
  7682.   │         [ IN DIALOG_WINDOW(winid) ]                                  │
  7683.   │                                                                      │
  7684.   │ UNCHECK {CHOICE(id) } [ IN DIALOG_WINDOW(winid) ]                    │
  7685.   │                       [ IN  TEXT_WINDOW(winid)  ]                    │
  7686.   └──────────────────────────────────────────────────────────────────────┘
  7687.  
  7688.  
  7689. Remarks:
  7690.  
  7691. If a RADIO_BUTTON or CHECK_BOX is UNCHECKed, the result  of  the  IS_CHECKED
  7692. Function will be false.
  7693.  
  7694. See Also:
  7695.  
  7696.   CHECK
  7697.   IS_CHECKED
  7698.  
  7699.  
  7700.  
  7701.  
  7702.                             12.118 VAL Function                             
  7703.  
  7704.  
  7705. Purpose:
  7706.  
  7707. Converts a string to a number.
  7708.  
  7709. Format:
  7710.  
  7711.   ┌──────────────────────────────────────────────────────────────────────┐
  7712.   │ VAL(<string> [,radix] )                                              │
  7713.   └──────────────────────────────────────────────────────────────────────┘
  7714.  
  7715. Remarks:
  7716.  
  7717. VAL converts the string to a number. The optional argument  radix  specifies
  7718. the base of string. The default radix is 10. If specified,  it  must  be  in
  7719. the range 2-36.
  7720.  
  7721. NOTE:
  7722.    Since AUTOPILOT automatically converts strings to numbers as needed,  the
  7723.    primary use of this function is for working with bases other than 10.
  7724.  
  7725. Example:
  7726.  
  7727.     VAL(10) returns "10"
  7728.     VAL("1010",2) returns "10"
  7729.  
  7730.  
  7731.  
  7732.  
  7733.                            12.119 WAIT Statement                            
  7734.  
  7735.  
  7736. Purpose:
  7737.  
  7738. Causes the scripting process to pause until a specified event has occurred.
  7739.  
  7740. Formats:
  7741.  
  7742.   ┌──────────────────────────────────────────────────────────────────────┐
  7743.   │ WAIT <timeval>                                                       │
  7744.   │                                                                      │
  7745.   │ WAIT FOR <string>  [AT <row> <col> ]                                 │
  7746.   │      [, <string-n> [AT <row> <col> ] ]                               │
  7747.   │       [ AFTER {TIMEOUT }<statement>]                                 │
  7748.   │       [     { timeval  }       ]                                     │
  7749.   │                                                                      │
  7750.   │ WAIT FOR <string>   [ FROM <row> <col> ]                             │
  7751.   │                     [ TO  <row> <col>  ]                             │
  7752.   │       [, <string-n> [ FROM <row> <col> ] ]                           │
  7753.   │                     [ TO  <row> <col>  ] ]                           │
  7754.   │       [ AFTER { TIMEOUT  } <statement> ]                             │
  7755.   │       [       {<timeval>}              ]                             │
  7756.   │                                                                      │
  7757.   │ WAIT FOR ACTION                                                      │
  7758.   │       [ AFTER <timeval> <statement> ]                                │
  7759.   │                                                                      │
  7760.   │ WAIT UNTIL <condition>                                               │
  7761.   │       [ AFTER { TIMEOUT } <statement> ]                              │
  7762.   │       [      {<timeval>}              ]                              │
  7763.   └──────────────────────────────────────────────────────────────────────┘
  7764.  
  7765. Remarks:
  7766.  
  7767.                           [ {SECOND(S) } ]
  7768.     <timeval> = <number>  [ {MINUTE(S) } ]
  7769.                           [ { HOUR(S)  } ]
  7770.  
  7771. Format 1 causes script execution to halt for the specified time interval.
  7772.  
  7773. Formats 2 and 3 causes script execution to halt until the  specified  string
  7774. pattern appears on the screen. The  pattern  is  specified  in  a  character
  7775. string form where:
  7776.  
  7777.     ?   - matches any character
  7778.     s*  - matches zero or more occurrences of character(s)
  7779.     s+  - matches 1 or more occurrence of character(s)
  7780.  
  7781. A leading backslash may be used to match one of the  special  characters  ?,
  7782. *, or +.
  7783.  
  7784. If multiple strings are supplied, the screen will be searched  for  a  match
  7785. with each of the strings in  the  order  specified.  WAIT  will  return  the
  7786. number of the string found in the FOUND Function. If the  first  string  was
  7787. found, the FOUND function would return a 1; if the third  string  was  found
  7788. the FOUND function would return a 3. If none of the strings were found,  the
  7789. FOUND function would return a 0.
  7790.  
  7791. The AT clause limits the  search  area  to  the  specified  row  and  column
  7792. values. The FROM and TO clauses allow you to specify a row/ column range  to
  7793. be searched. If neither the AT or FROM/TO clauses are specified, the  entire
  7794. screen will be searched.
  7795.  
  7796. The screen will be searched continually for a match for the  time  specified
  7797. in the AFTER clause. If the keyword TIMEOUT is used or if the  AFTER  clause
  7798. is not specified; the screen will be searched  for  a  match  for  the  time
  7799. indicated by the MAXWAIT value (see the SET Statement).
  7800.  
  7801. If the string is not found on the screen within the appropriate time  limit,
  7802. the <statement> indicated in the AFTER  clause  will  be  executed.  If  the
  7803. AFTER clause is not specified the ON  TIMEOUT  Statement  will  be  executed
  7804. (see the ON Statement).
  7805.  
  7806. Format 4 (ACTION) waits until a selection is made from the Action Bar  Menu.
  7807. Action Bar Menus are defined using the ACTION_BAR_MENU clause on the  CREATE
  7808. TEXT_WINDOW Statement.  Since this format causes the  AUTOPILOT  program  to
  7809. pause until an Action Bar Menu item is selected, it is  normally  used  when
  7810. you wish to drive your application from the  Action  Bar  Menu.    WAIT  FOR
  7811. ACTION has no MAXWAIT and will wait forever if no selections are made.
  7812.  
  7813. WARNING:
  7814.      If multiple windows are being supported in an  AUTOPILOT  program,  the
  7815.      desired window must be the CURRENT_WINDOW  for  all  window  Statements
  7816.      and Functions to work.  See the SET CURRENT_WINDOW Statement  for  more
  7817.      information on how this is done.
  7818.  
  7819. Format 5 uses the WAIT Statement with the UNTIL clause. This format  of  the
  7820. WAIT Statement will wait until <condition> is TRUE (non-zero).
  7821.  
  7822. Examples:
  7823.  
  7824.     WAIT 25.5 SECONDS
  7825.     WAIT FOR "TalkThru" AFTER 30 SECONDS GOTO END
  7826.     WAIT FOR "LOGOFF AT ??:??:??"
  7827.     WAIT FOR "VM READ" AT 24, 60 AFTER time_iden
  7828.     PERFORM any_rtn:
  7829.  
  7830.     WAIT FOR ACTION AFTER 20 MINUTES GOTO idle_rtn
  7831.  
  7832.     WAIT UNTIL QUIET(10 SECONDS)
  7833.         AFTER 2 MINUTES GOTO error_exit
  7834.  
  7835.     WAIT FOR "VM/CMS" , "MVS/TSO"
  7836.     PERFORM DEPENDING_ON FOUND vm_rtn , mvs_rtn
  7837.  
  7838. See Also:
  7839.  
  7840.   QUIET
  7841.  
  7842.  
  7843.  
  7844.  
  7845.                            12.120 WHILE Statement                           
  7846.  
  7847.  
  7848. Purpose:
  7849.  
  7850. This function allows scripting loop control.
  7851.  
  7852. Format:
  7853.  
  7854.   ┌──────────────────────────────────────────────────────────────────────┐
  7855.   │ WHILE <expression>                                                   │
  7856.   │                                                                      │
  7857.   │   <statement-1>                                                      │
  7858.   │                                                                      │
  7859.   │   CONTINUE_WHILE                                                     │
  7860.   │                                                                      │
  7861.   │   <statement-2>                                                      │
  7862.   │                                                                      │
  7863.   │   BREAK_WHILE                                                        │
  7864.   │                                                                      │
  7865.   │   <statement- n>                                                     │
  7866.   │                                                                      │
  7867.   │ END_WHILE                                                            │
  7868.   │                                                                      │
  7869.   └──────────────────────────────────────────────────────────────────────┘
  7870.  
  7871. Remarks:
  7872.  
  7873. Used to support script loop control.
  7874.  
  7875. As long as the expression following the WHILE Statement  remains  true,  the
  7876. statements between it and an END_WHILE Statement will  be  executed.  Nested
  7877. WHILEs are supported.
  7878.  
  7879. The BREAK_WHILE Statement  causes  termination  of  the  smallest  enclosing
  7880. WHILE. Control passes to the statement following the END_WHILE.
  7881.  
  7882. The  CONTINUE_WHILE  Statement  causes  control  to  pass  to  the  smallest
  7883. enclosing WHILE where the <expression> is evaluated again.
  7884.  
  7885. Examples:
  7886.  
  7887.     set i = 0
  7888.     WHILE i < 10
  7889.       DISPLAY "Value of i = "&i
  7890.       set i = i + 1
  7891.     END_WHILE
  7892.  
  7893.     WHILE i < 10
  7894.       DISPLAY "Value of i = "&i
  7895.       PERFORM get_j
  7896.       if j = 1 BREAK_WHILE
  7897.       if i = 5
  7898.         begin
  7899.             display "Mid Point"
  7900.             CONTINUE_WHILE
  7901.         end
  7902.       set i = i + 1
  7903.     END_WHILE
  7904.  
  7905.  
  7906. See Also:
  7907.  
  7908.   BREAK_WHILE
  7909.   END_WHILE
  7910.  
  7911.  
  7912.  
  7913.  
  7914.                        12.121 WINDOW_HANDLE Function                        
  7915.  
  7916.  
  7917. Purpose:
  7918.  
  7919. This function is used to support the ability to call functions available  in
  7920. Dynamic Link Libraries (DLLs).  Before using this  function,  refer  to  the
  7921. section,  Calling  DLL  Functions  Directly  in  the  chapter,  AUTOPILOT
  7922. Statements By Category for more information on how this is used.
  7923.  
  7924. This function allows you to retrieve  the  window  handle  of  a  dialog  or
  7925. control so that you may pass it on to a DLL function.
  7926.  
  7927. Format:
  7928.  
  7929.   ┌──────────────────────────────────────────────────────────────────────┐
  7930.   │ WINDOW_HANDLE ( { TEXT_WINDOW(winid)   } )                           │
  7931.   │                 { DIALOG_WINDOW(winid) }                             │
  7932.   │                                                                      │
  7933.   │ WINDOW_HANDLE ( { TEXT_FIELD(id)            } )                      │
  7934.   │                 { ENTRY_FIELD(id)           }                        │
  7935.   │                 { PUSH_BUTTON(id)           }                        │
  7936.   │                 { RADIO_BUTTON(id)          }                        │
  7937.   │                 { CHECK_BOX(id)             }                        │
  7938.   │                 { LIST_BOX(id)              }                        │
  7939.   │                 { COMBINATION_BOX(id)       }                        │
  7940.   │                 { GROUP_BOX(id)             }                        │
  7941.   │                 { ICON_FIELD(id)            }                        │
  7942.   │                 { MULTILINE_ENTRY_FIELD(id) }                        │
  7943.   │                   [ IN DIALOG_WINDOW(id) ]                           │
  7944.   └──────────────────────────────────────────────────────────────────────┘
  7945.  
  7946. NOTE:
  7947.    When passing a window handle to a DLL function, it should be declared  as
  7948.    'ushort' for Windows and 'ulong' for OS/2.
  7949.  
  7950. See Also:
  7951.  
  7952.   DECLARE FUNCTION Statement
  7953.  
  7954.  
  7955.  
  7956.  
  7957.                            12.122 WRITE Statement                           
  7958.  
  7959.  
  7960. Purpose:
  7961.  
  7962. Writes data to a file.
  7963.  
  7964. Format:
  7965.  
  7966.   ┌──────────────────────────────────────────────────────────────────────┐
  7967.   │       {CSV    }                                                      │
  7968.   │ WRITE {LINE   } <filenum> <identifier-1>                             │
  7969.   │       {BUFFER }     [ FOR <maxsize> ]                                │
  7970.   │                     [ AT <offset> [,<origin> ] ]                     │
  7971.   │                                                                      │
  7972.   │             [, <identifier-2>                                        │
  7973.   │              [ FOR <maxsize> ]                                       │
  7974.   │             [ AT <offset> [,<origin> ] ]                             │
  7975.   │                                                                      │
  7976.   │               [,  . . . ]                                            │
  7977.   └──────────────────────────────────────────────────────────────────────┘
  7978.  
  7979. Remarks:
  7980.  
  7981. CSV
  7982.        a keyword indicating that the data is  to  be  written  in  as  Comma
  7983.        Separated Values (this is the default)
  7984. LINE
  7985.        a keyword indicating that the values are to be written   followed  by
  7986.        a carriage return
  7987. BUFFER
  7988.        a keyword indicating that the data is to be written randomly
  7989.  
  7990. <filenum>
  7991.        is the number used when the file was opened.
  7992.  
  7993. <identifier-n>
  7994.        is the data item which is to be written to the  file.  It  may  be  a
  7995.        string or a number.
  7996.  
  7997. FOR <maxsize>
  7998.         limits the amount of data that will be written.   Used  mainly  with
  7999.         WRITE BUFFER.
  8000.  
  8001. AT <offset><origin>
  8002.            specifies a new position for the "write pointer"
  8003.  
  8004.  
  8005. The file must be opened for OUTPUT or APPEND.
  8006.  
  8007. If no keyword is specified or if the CSV  keyword  is  specified,  the  data
  8008. items  will  be  written  in  comma  separated  format.  Numeric  items  are
  8009. converted to a string value and  written  without  quotation  marks.  String
  8010. items are written  with  leading  and  trailing  quotation  marks.  Imbedded
  8011. quotes are handled correctly.
  8012.  
  8013. If the LINE keyword is specified, all characters in value-1 are written.
  8014.  
  8015. A carriage return/line feed is written at the end of the WRITE Statement  in
  8016. both formats.
  8017.  
  8018. If the BUFFER keyword is specified,  a  specific  number  of  bytes  may  be
  8019. written to the file without additions such as CRLF (as  in  WRITE  LINE)  or
  8020. commas (as in WRITE CSV).  WRITE BUFFER could also be used to  write  binary
  8021. data since it does not write the hex 1A End-Of-File mark.  READ  BUFFER  and
  8022. WRITE BUFFER can also be used to  save  window  images  (see  the  PC_SCREEN
  8023. function with the CHARATTR option).
  8024.  
  8025. The FOR <maxsize> clause is normally used with the WRITE BUFFER Statement.
  8026.  
  8027. All WRITE types allow data to be accessed "randomly" (via the AT clause)  so
  8028. that data may be written to any position in the file in any order.  This  is
  8029. valid for files opened as OUTPUT or INPUT OUTPUT  (files  opened  APPEND  or
  8030. INPUT APPEND always direct  all  writes  to  the  end  of  the  file).    To
  8031. understand random file I/O, it may help  to  understand  the  concept  of  a
  8032. "write pointer".
  8033.  
  8034. The "write pointer" always points to the part  of  the  file  that  will  be
  8035. written to in the next WRITE  Statement.    When  the  file  is  opened  for
  8036. OUTPUT, the "write pointer" is initialized to point to  the  first  byte  in
  8037. the file.  As data is read  by  ensuing  sequential  WRITE  Statements,  the
  8038. "write pointer" is increased by the number of bytes written.
  8039.  
  8040. The AT <offset> [,<origin>] clause  allows  you  to  reposition  the  "write
  8041. pointer":
  8042.  
  8043.  <offset>
  8044.       is the number of bytes from <origin>
  8045.  <origin>
  8046.       is a constant that defines the initial position:
  8047.  
  8048.        0  - beginning of the file (default)
  8049.        1  - current position of the "write pointer"
  8050.        2  - end of file
  8051.  
  8052. As with normal sequential writes, after a READ Statement with the AT  clause
  8053. is executed, the "write pointer" is increased by the number of bytes read.
  8054.  
  8055. Examples:
  8056.  
  8057.     SET a1 = "ANY STRING"
  8058.     SET b1 = 45.6
  8059.     WRITE filenum 12.3,STR_LEFT(a1,3),b1
  8060.     WRITE filenum a1
  8061.     WRITE LINE filenum "STRING CONSTANT"
  8062.     WRITE LINE filenum a1
  8063.     WRITE LINE filenum b1
  8064.  
  8065. This example would write the following lines to a file.
  8066.  
  8067.     12.3,"ANY",45.6
  8068.     "ANY STRING"
  8069.     STRING CONSTANT
  8070.     ANY STRING
  8071.     45.6
  8072.  
  8073. Write 100 bytes to a file starting at byte position 500:
  8074.  
  8075.     WRITE BUFFER xbuff FOR 100 AT 500
  8076.  
  8077. Write over the last 2 bytes in a file:
  8078.  
  8079.     WRITE BUFFER xbuff FOR 2 AT 2,2
  8080.  
  8081. See Also:
  8082.  
  8083.   CLOSE
  8084.   OPEN
  8085.   READ
  8086.   WRITE_POSITION
  8087.  
  8088.  
  8089.  
  8090.  
  8091.                        12.123 WRITE_POSITION Function                       
  8092.  
  8093.  
  8094. Purpose:
  8095.  
  8096. To obtain the current "write pointer".
  8097.  
  8098. Format:
  8099.  
  8100.   ┌──────────────────────────────────────────────────────────────────────┐
  8101.   │ WRITE_POSITION(<filenum>)                                            │
  8102.   └──────────────────────────────────────────────────────────────────────┘
  8103.  
  8104. Remarks:
  8105.  
  8106. Returns the current position of the "write pointer" for the  file  indicated
  8107. by filenum.  See the WRITE Statement for  more  information  on  the  "write
  8108. pointer".
  8109.  
  8110. Examples:
  8111.  
  8112.     set t_pointer = WRITE_POSITION(out_file
  8113.  
  8114. See Also:
  8115.  
  8116.   READ_POSITION
  8117.