home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 447 / MACRO5-.SIS / RunExtras.opl (.txt) < prev    next >
Encoding:
EPOC OPL Source  |  1999-02-26  |  1.6 KB  |  68 lines

  1.  
  2.  
  3. REM Macro RunExtras version 1.01
  4. REM Run programs in the Extras bar without the pen
  5. REM By Pascal NICOLAS, to be used with Macro5
  6. REM Last edited on 6 May 1998
  7.  
  8. Const KMaxApps%=100
  9. Const KMaxName%=30
  10.  
  11. PROC Macro:
  12.     Local Extras$(KMaxApps%,KMaxName%),Name$(KMaxName%),File$(255),c%,d%,m%
  13.  
  14.     dInit "Extras"
  15.     
  16.     REM Extras in Z:
  17.     dChoice m%,"","Bombs,Record,Spell,Progam,..."
  18.     Extras$(1)="Bombs"
  19.     Extras$(2)="Record"
  20.     Extras$(3)="Spell"
  21.     Extras$(4)="TextEd"
  22.     Extras$(5)="Comms"
  23.     m%=5
  24.  
  25.     REM Extras in C:
  26.     c%=m%
  27.     File$=Dir$("c:\System\Apps\")
  28.     While File$ <> "" and m% < KMaxApps%
  29.         Name$=Mid$(File$,16,255)
  30.         If Exist(File$+"\"+Name$+".app")
  31.             dChoice m%,"",Extras$(m%)+",..."
  32.             m%=m%+1
  33.             Extras$(m%)=Name$
  34.         Endif
  35.         File$=Dir$("")
  36.     EndWh
  37.  
  38.     REM Extras in D:
  39.     d%=m%
  40.     If Exist("d:\System\Apps\")
  41.         File$=Dir$("d:\System\Apps\")
  42.         While File$ <> "" and m% < KMaxApps%
  43.             Name$=Mid$(File$,16,255)
  44.             If Exist(File$+"\"+Name$+".app")
  45.                 dChoice m%,"",Extras$(m%)+",..."
  46.                 m%=m%+1
  47.                 Extras$(m%)=Name$
  48.             Endif
  49.             File$=Dir$("")
  50.         EndWh
  51.     Endif
  52.  
  53.     dChoice m%,"",Extras$(m%)
  54.  
  55.     REM Display the list and run the selected app
  56.     If Dialog
  57.         If m% > d%
  58.             FgApp%:("d:\System\Apps\"+Extras$(m%)+"\"+Extras$(m%)+".app")
  59.         Elseif m% > c%
  60.             FgApp%:("c:\System\Apps\"+Extras$(m%)+"\"+Extras$(m%)+".app")
  61.         Else
  62.             FgApp%:("z:\System\Apps\"+Extras$(m%)+"\"+Extras$(m%)+".app")
  63.         Endif
  64.     Endif
  65. ENDP
  66.  
  67.  
  68.