home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / HISOFT.LZH / HISOFT_B.MSA / HGTTUTOR / SHELL.BAS < prev    next >
BASIC Source File  |  1992-01-14  |  1KB  |  50 lines

  1. REM The Shell program referred to in the
  2. REM HiSoft BASIC 2 tutorial.
  3. REM Needs the HGT.T pre-tokenised file (from the HGT folder)
  4. REM and its own .BH and .RSC files.
  5.  
  6. REM $option k150,y
  7. REM $include shell.bh
  8.  
  9. SUB ProcessUserMenus(VAL cur_front,VAL item,VAL title)
  10. SHARED texth,wolines(1),lines$(2),TextWindows,ImageWindows
  11. STATIC i,fi$,temp,id,curline$,Comm
  12.  
  13. SELECT CASE item
  14. CASE MeAboutShell: junk=NewForm_Alert(AboutAlert,1)
  15. CASE MeShowTextFi:    
  16.         fi$=FileSelect$
  17.         IF fi$<>"" THEN
  18.             LoadTextFile fi$,TextWindows,wolines(TextWindows)
  19.             texth=OpenTextWindow(fi$,win_all-win_info)
  20.         END IF
  21.  
  22. CASE    MeShowImageF:
  23.         fi$=FileSelect$
  24.         IF fi$<>"" THEN
  25.             LoadPicture fi$,imagewindows
  26.             texth=OpenImageWindow(fi$,win_all-win_info)
  27.         END IF
  28.         
  29. CASE MeRunProgram:
  30.         fi$=FileSelect$
  31.         IF fi$<>"" THEN Execute fi$,curline$
  32.         
  33. CASE MeSetCommandL:
  34.         SelectTree CLine
  35.         Sette_ptext Clcommandline,curline$
  36.         Comm=HandleDialog(CLcommandline)
  37.         SELECT CASE Comm 
  38.         CASE ClOK:
  39.             curline$=Gette_ptext$(CLcommandline)
  40.         END SELECT
  41. END SELECT
  42.  
  43. END SUB
  44.  
  45. StartProgram "SHELL.RSC",MENU1,MEQUIT
  46. InitTextWindows 2,1500
  47. DIM images(2,fd_size)
  48. expandtabsflag=-1
  49. HGTloop
  50. StopProgram