home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 12 / Macro5SIS.sis / M5Macros.sis / RunExtras.opl (.txt) < prev    next >
Encoding:
EPOC OPL Source  |  2000-10-17  |  1.9 KB  |  81 lines

  1.  
  2.  
  3. REM Macro RunExtras version 1.05
  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 21 September 1999
  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.     If RomVersion%: < 105
  18.         dChoice m%,"","Bombs,Comms,Progam,Record,..."
  19.         Extras$(1)="Bombs"
  20.         Extras$(2)="Comms"
  21.         Extras$(3)="TextEd"
  22.         Extras$(4)="Record"
  23.         Extras$(5)="Spell"
  24.         m%=5
  25.     Else
  26.         dChoice m%,"","Bombs,Comms,Data,Progam,Record,Sketch,Spell,..."
  27.         Extras$(1)="Bombs"
  28.         Extras$(2)="Comms"
  29.         Extras$(3)="Data"
  30.         Extras$(4)="TextEd"
  31.         Extras$(5)="Record"
  32.         Extras$(6)="Sketch"
  33.         Extras$(7)="Spell"
  34.         Extras$(8)="Time"
  35.         m%=8
  36.     Endif
  37.  
  38.     REM Extras in C:
  39.     c%=m%
  40.     File$=Dir$("c:\System\Apps\")
  41.     While File$ <> "" and m% < KMaxApps%
  42.         Name$=Mid$(File$,16,255)
  43.         If Exist(File$+"\"+Name$+".app")
  44.             dChoice m%,"",Extras$(m%)+",..."
  45.             m%=m%+1
  46.             Extras$(m%)=Name$
  47.         Endif
  48.         File$=Dir$("")
  49.     EndWh
  50.  
  51.     REM Extras in D:
  52.     d%=m%
  53.     If Exist("d:\System\Apps\")
  54.         File$=Dir$("d:\System\Apps\")
  55.         While File$ <> "" and m% < KMaxApps%
  56.             Name$=Mid$(File$,16,255)
  57.             If Exist(File$+"\"+Name$+".app")
  58.                 dChoice m%,"",Extras$(m%)+",..."
  59.                 m%=m%+1
  60.                 Extras$(m%)=Name$
  61.             Endif
  62.             File$=Dir$("")
  63.         EndWh
  64.     Endif
  65.  
  66.     dChoice m%,"",Extras$(m%)
  67.  
  68.     REM Display the list and run the selected app
  69.     If Dialog
  70.         If m% > d%
  71.             FgApp%:("d:\System\Apps\"+Extras$(m%)+"\"+Extras$(m%)+".app")
  72.         Elseif m% > c%
  73.             FgApp%:("c:\System\Apps\"+Extras$(m%)+"\"+Extras$(m%)+".app")
  74.         Else
  75.             FgApp%:("z:\System\Apps\"+Extras$(m%)+"\"+Extras$(m%)+".app")
  76.         Endif
  77.     Endif
  78. ENDP
  79.  
  80.  
  81.