home *** CD-ROM | disk | FTP | other *** search
EPOC OPL Source | 1999-02-26 | 1.6 KB | 68 lines |
-
-
- REM Macro RunExtras version 1.01
- REM Run programs in the Extras bar without the pen
- REM By Pascal NICOLAS, to be used with Macro5
- REM Last edited on 6 May 1998
-
- Const KMaxApps%=100
- Const KMaxName%=30
-
- PROC Macro:
- Local Extras$(KMaxApps%,KMaxName%),Name$(KMaxName%),File$(255),c%,d%,m%
-
- dInit "Extras"
-
- REM Extras in Z:
- dChoice m%,"","Bombs,Record,Spell,Progam,..."
- Extras$(1)="Bombs"
- Extras$(2)="Record"
- Extras$(3)="Spell"
- Extras$(4)="TextEd"
- Extras$(5)="Comms"
- m%=5
-
- REM Extras in C:
- c%=m%
- File$=Dir$("c:\System\Apps\")
- While File$ <> "" and m% < KMaxApps%
- Name$=Mid$(File$,16,255)
- If Exist(File$+"\"+Name$+".app")
- dChoice m%,"",Extras$(m%)+",..."
- m%=m%+1
- Extras$(m%)=Name$
- Endif
- File$=Dir$("")
- EndWh
-
- REM Extras in D:
- d%=m%
- If Exist("d:\System\Apps\")
- File$=Dir$("d:\System\Apps\")
- While File$ <> "" and m% < KMaxApps%
- Name$=Mid$(File$,16,255)
- If Exist(File$+"\"+Name$+".app")
- dChoice m%,"",Extras$(m%)+",..."
- m%=m%+1
- Extras$(m%)=Name$
- Endif
- File$=Dir$("")
- EndWh
- Endif
-
- dChoice m%,"",Extras$(m%)
-
- REM Display the list and run the selected app
- If Dialog
- If m% > d%
- FgApp%:("d:\System\Apps\"+Extras$(m%)+"\"+Extras$(m%)+".app")
- Elseif m% > c%
- FgApp%:("c:\System\Apps\"+Extras$(m%)+"\"+Extras$(m%)+".app")
- Else
- FgApp%:("z:\System\Apps\"+Extras$(m%)+"\"+Extras$(m%)+".app")
- Endif
- Endif
- ENDP
-
-
-