Apps

If you have too many programmes, applications or routines that are cluttering up your Organiser Top Level Menu. Then you could create a sub-menu routine that groups together these APPlicationS. In the screen graphic above you will see two such routines Apps and Games. An example for the Apps listing is shown below, you of course would change the menu items. If you would like to combine all your work together but do not have the memory or Datapak space to store everything together then you may consider using one of Olivier Gossuin's 256k RamPaks where storage space is not an issue.

You of course will put your own OPL programmes in the MENUN statement.
AppUDG: recreates the menu graphic.
mnuTOP:(2) Can be a standard routine for printing the menu top line graphic and clock before any MENUN command.
AP:(x,y,"text") is a standard At Print routine
Prnt:: Is a sub-menu to select Comms Link and Psi2Win Print Mode to print out the contents of A:MAIN.odb and the Directory of A: B: C:
CMMS:: Is another sub-menu to group together other Comms Link operations as shown.
APPS:LOCAL m%DOTOP::m%=0AppUDG:mnuTOP:(2)m%=MENUN(2,"Router,Mpg,Land,Comms,Ram,Cube,Print,Off,Quit")IF m%=1 :Router: :ENDIFIF m%=2 :MPG: :ENDIFIF m%=3 :Land: :ENDIFIF m%=4 :GOTO CMMS:: :ENDIFIF m%=5 :RAMSIZE: :ENDIFIF m%=6 :Cube: :ENDIFIF m%=7 :GOTO Prnt:: :ENDIFIF m%=8 :Off :ENDIFIF m%=9 :m%=0 :ENDIFUNTIL m%=0RETURN
Prnt::CLS : AP:(1,1,"[Psy2Win Print Mode]")m%=MENUN(2,"Main.ODB,Directory,Quit")IF m%=1 :Mprint: :ENDIFIF m%=2 :SendDir: :ENDIFGOTO TOP::
CMMS::CLS : AP:(1,1,"Psy2Win FileTransfer")m%=MENUN(2,"SendFile,SendAll,GetFile,Load,Directory,Quit")IF m%=1 :SendFile: :ENDIFIF m%=2 :SendAll: :ENDIFIF m%=3 :GetFile: :ENDIFIF m%=4 :LOAD: :ENDIFIF m%=5 :SendDir: :ENDIFGOTO TOP::-----------------------------------------------------AppUDG:UDG 0,15,9,15,15,15,15,0,31-----------------------------------------------------mnuTOP:(x%)print chr$(15);chr$(22);chr$(23)AT 1,1PRINT chr$(0);rept$(chr$(2),14)CLOCK(1)AT 1,x%RETURN-----------------------------------------------------SendDir:LOCAL f$(14),ty$(4),m$(20),p$(1),b$(20),len%,ok%,c%,m%,tb%ONERR Problem::
m$="Printout Directory"CLSAT 2,1 :PRINT m$PRINT CHR$(25)m%=MENUN(2,"A:,B:,C:,QUIT")IF m%=0 or m%=4 : RETURN :ENDIFp$=CHR$(64+m%)
TRAP DELETE "A:DIRLIST"CREATE "A:DIRLIST",A,fn$
AT 2,1 :PRINT m$AT 1,2 :PRINT " Create File"AT 1,3 :PRINT " Directory Listing"DOc%=c%+1f$=DIRW$(p$+":*.*")WHILE f$<>"" ok%=0 :b$=REPT$(" ",20) ty$=RIGHT$(f$,4) len%=LEN(f$) :b$=LEFT$(b$,(17-len%)) IF c%=1 AND ty$=".ODB" ok%=1 ELSEIF C%=2 AND ty$=".OPL" ok%=1 ELSEIF c%=3 AND ty$=".DIA" ok%=1 ELSEIF c%=4 AND ty$=".COM" ok%=1 ELSEIF c%=5 AND ty$=".PLN" ok%=1 ELSEIF c%=6 AND ty$=".PAG" ok%=1 ELSEIF c%=7 AND ty$=".NTS" ok%=1 ENDIF IF ok%=1 AT 1,4 :PRINT "Add ",f$;CHR$(26) A.FN$=f$+b$ APPEND ENDIF f$=DIRW$("")ENDWHUNTIL c%=7CLOSE
OPEN "A:DIRLIST",A,fn$FIRSTAT 2,1 :PRINT m$AT 1,2 :PRINT "File Ready to Print"AT 1,3 :PRINT "[Psy2Win Print Mode]"AT 1,4 :PRINT "here ON=Quit EXE=GO"c%=GETIF c%<>13 RETURNENDIFAT 1,3 :PRINT "Busy: Print Filename"tb%=0LPRINTDO tb%=tb%+1 AT 1,4 :PRINT A.fn$;CHR$(26) LPRINT " ";A.fn$; IF tb%=4 :tb%=0 :LPRINT :ENDIF NEXTUNTIL EOFCLOSE
c%=0 :tb%=0LPRINTLPRINTLPRINT " ORGANISER Directory Pak ";p$;":";LPRINT " Date ";MID$(datim$,5,47);LPRINT " - T.M.Reid"LPRINT
AT 1,2 :PRINT m$PRINT CHR$(15) :PRINT CHR$(25)AT 1,4:PRINT "Job done EXE returns" :GETReturn
REM Errors------Problem::ONERR OFFCLS :PRINT m$ :Print "Error detected..." :Print err$(err)GET
RETURN

Programming LZ

RAMsize:LOCAL D%,D$(6)UDG 1,16,18,20,24,20,18,0,31UDG 2,0,0,0,0,0,0,0,31CLSDOAT 1,1PRINT CHR$(0);REPT$(CHR$(2),14)CLOCK(1)AT 1,2 : PRINT "Free Memory in?"AT 1,3 : D%=MENUN(1,"A:,B:,C:,Quit") IF D%=0 OR D%=4 : RETURN :ENDIF AT 1,4 D$=CHR$(64+d%)+":MAIN" IF EXIST(D$) OPEN D$,A,A$ PRINT LEFT$(D$,2);" Free ";space;" k" CLOSE ELSE PRINT "No memory on ";LEFT$(D$,2) ENDIFUNTIL D%=0GET

Psion Organiser II users who would like to comment or are looking for further information or instructions can leave a message for Martin