*  ===============================================================
*                 Sample Listbox BASIC Program
* 
*                          LISTDATA
*  
*  Demonstrates the use of the LISTBOX.SCR file using listbox 
*  entries from a data file.  The listbox contains employee
*  ID codes which are stored as hidden data fields in the listbox.
*  
*           Copyright CLEARVIEW Software Inc. 1992, 1993
*                      All Rights Reserved
*  ===============================================================
* 
* 
* =================================================================
*  Initialize some string variables and assign the API string prefix
* =================================================================
  STRING = ''
  EQU MAGIC TO CHAR(127)
* 
*  
* =================================================================
*  Send the API to Co*Star using the following output:
* 
*   Output                  Description
*   ---------------------   ---------------------------------------
*   MAGIC:"UWSCRIPT        API for executing external script file
* 
*   sdk\listbox.scr         Path and filename for the script file
* 
*   2                       List box type -- information is read
*                           from a file and has hidden data fields
*                           See LISTBOX.SCR for details.
* 
*  Sample Listbox           Title for the listbox window.
* 
*  1                        Flag to append a CR to the selected 
*                           item.
*         
*  sdk\empdata.dat          Filename of the data file that contains
*                           the list of employee names and IDs. This
*                           file resides on the PC disk or network.
* 
*  10,10,20,40              Display coordinates for listbox.
* 
*  MAGIC                   API terminator.
* =================================================================
PRINT MAGIC:
PRINT "UWSCRIPTsdk\listbox.scr,2,Sample ListBox,1,sdk\empdata.dat,":
PRINT "10,10,20,40":
PRINT MAGIC:
* 
*   
*      
* =================================================================
*  Wait for the user to  select an item from the list box.
*  The selected data item will be returned to STRING.  If no
*  selection was made the STRING will be null.
* =================================================================

EXECUTE "PTERM CASE NOINVERT"  

PRINT @(-1)
PRINT "Enter employee ID: ":
INPUT STRING

EXECUTE "PTERM CASE INVERT"  
* 
END
