home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 1994-01-24 | 1.1 KB | 44 lines |
- Menu file converter
- Converts DeskMen menu files to text
- Written by Ian Clark
- (c) 1994 Ian Clark
- $+" ("+
- t$=""
- "DeskMen menu file to text converter."
- "By and (c) 1994 Ian Clark"
- "------------------------------------"'
- "Please enter the name of the file to convert."
- "If you just press <Return> then the default of"
- "'<DMen$Dir>.MenuDef' will be used."'
- "File to convert =>"in$
- in$=""
- in$="<DMen$Dir>.MenuDef"
- '"Now enter the output file, default 'Converted'"'
- "Output as =>"out$
- out$=""
- out$="Converted"
- "XOS_File",17,in$
- ,,,,len%;error%
- error%
- 0,"I can't read that file! Does it exist?"
- block% len%
- "OS_File",16,in$,block%,0
- x%=0
- (block%?x%)
- t$<>"MENU"
- '"Old style menu file"
- x%=0
- len%
- block%?x%=block%?x%>>>1
- block%?x%=0 block%?x%=10
- block%-=4
- len%+=4
- '"New style menu file"
- x%=4
- len%
- block%?x%=block%?x%
- block%?x%=0 block%?x%=10
- '"Saving file"
- "OS_File",10,out$,&FFF,,block%+4,block%+len%
- '"File saved as '";out$;"'"
-