home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
progmisc
/
msh21b.zip
/
MSHFILES.ZIP
/
MENU.MSH
< prev
next >
Wrap
Text File
|
1992-08-19
|
9KB
|
262 lines
| file MENU.MSH where menus are defined
|
| ┌───────────┐
| │ Quit menu │
| └───────────┘
|
((quit)(cmdlist prog_dir"cmdlst"& dup unlink write quit)
"just %quit%
or also %save% your cmd stack?"
() "-1" 12 "hv" temp_menu)qmenu!
|
("your turn""please create your own menu here"message)yourmenu!
|
| ┌────────────┐
| │ Drive menu │
| └────────────┘
|
( floppy_drives fixed_drives &
0 i!
(dup length i >)
(i 1 + i! dup i i substring ":\""& "(\""swap& "cwd!refresh)"& # swap)
while
0 i!"" swap
(dup length i >)
(i 1 + i! dup i i substring ":%"&" "&" %"swap& 3 roll swap& swap)
while
drop
() linescols i 4 * 2+ - swap 2/ menu_line+
"hv: Goto " permanent_menu
drive_menu_no!)
drive_menu!
|
| ┌────────────────────┐
| │ Miscellaneous menu │
| └────────────────────┘
|
((ascii)("att.ans"pager)(panel_stats)(dosmenu)(prog_dir "cmdlst"&read cmdlist!)
(toggle_menu)(true capt_screen)
(selected_fit_other)(reconfig)(swap_menu)
" ShiftF1 %ascii table%
%table of ANSI video attributes%
CtrlL %panel and disk stats%
ShiftF7 %DOS commands%
%read old command stack%
ShiftF4 %1/2 line top menu%
ShiftF5 %capture screen%
ShiftF2 %space on other panel%
F9 %change configuration%
ShiftF10 %swap menu%" (main_menu) 20 menu_line 1+ "hv" temp_menu)imenu!
|
| ┌───────────────────┐
| │ DOS Commands menu │
| └───────────────────┘
|
(("chkdsk "exec)("format a:"exec)("c:\" cwd"!"format a: /s"exec)
("format b:"exec)("format b: /n:9 /t:80" exec)
(" warning "" Either you don't know what you're doing, and Mi-Shell
is not going to protect you from big mistakes,
or you are kidding, and so are we . . . !"message)
"%chkdsk%
%format a:%
%format a: bootable%
%format b: (1.4M)%
%format b: (720K in 1.4M drive)%
%format C:%
" (main_menu) 15 menu_line 1+ "hv" temp_menu)dosmenu!
|
| ┌───────────┐
| │ File menu │
| └───────────┘
|
((select_on_off)(copy_files)(move_files)(delete_files)(whereis)(find_string)
( "what zip file do you want to create (or update)?"
50 input dup
("pkzip "swap& " @"&make_responsefile&execute tmp_filename unlink reread)
if)
( "what arj file do you want to create (or update)?"
50 input dup
("arj a "swap& " !"&make_responsefile&execute tmp_filename unlink reread)
if)
(editor exec)("stats" file_stats message)("copy "current.name &" prn"& exec)
" F2 %select%
F5 %copy% selected
F6 %move% selected
F8 %delete% selected
%find a file%
%find a string%
%zip% selected
%arj% selected
%edit new%
CtrlF9 %specs% of current file
%print%" (main_menu) 1 menu_line 1+ "hv" temp_menu)fmenu!
|
| ┌────────────────┐
| │ View/Edit menu │
| └────────────────┘
|
((browse_current)(editor current.name & exec)
(editor selected_list deselect & exec)(od)(wc)
(browser selected_list deselect & (exec) with_nomagic)
" F3 %view current%
F4 %edit current%
%edit selected%
ShiftF3 %hex dump%
%word count selected%
CtrlF3 %browse selected%" (main_menu) 8 menu_line 1+ "hv" temp_menu)vmenu!
|
| ┌────────────┐
| │ Panel menu │
| └────────────┘
|
((expand_panel)(trim_panel)(hide_all)(wide_narrow)(swap_panels)(refresh)
(side_by_side) (full_screen_panels)(top_bottom)
("N" panel.sort!)("E" panel.sort!)("S" panel.sort!)("T" panel.sort!)
" CtrlE %Expand% panel
CtrlT %Trim% panel
CrtlO %hide% panels and menus (toggle)
AltW %toggle full info/filenames only%
CtrlU %swap% panels
CtrlR %Refresh% panel
Panel disposition
%side-by-side%
%side-by-side full screen%
%one atop the other%
Sort Panel by
AltN %Name%
AltE %Extension%
AltS %Size%
AltT %Time%
" (main_menu) 35 menu_line 1+ "hv" temp_menu)pmenu!
|
| ┌────────────┐
| │ Help menus │
| └────────────┘
(prog_dir swap makename pager hmenu0)h0show!
(("userman.doc"h0show)
("refman.doc"h0show)
("design.doc"h0show)
("history.doc"h0show)
("ordrform.doc"h0show)
("msh.art"h0show)
("config.msh"h0show)
("stddefs.msh"h0show)
("keybind.msh"h0show)
("menu.msh"h0show)
("ext.msh"h0show)
("help.msh"h0show)
("arjzip.msh"h0show)
("berk.msh"h0show)
("wildrun.msh"h0show)
" %userman.doc% User's manual (default environment)
%refman.doc% Reference manual (MSH language)
%design.doc% Explanation of some design features
%history.doc% History of changes between versions
%ordrform.doc% Order form
%msh.art% A good review of MSH by M.Durant
%config.msh% overall configuration
%stddefs.msh% standard definitions
%keybind.msh% how the keys are bound to actions
%menu.msh% menu definitions
%ext.msh% what to do with typical file extensions
%help.msh% this file
%arjzip.msh% support for .zip and .arj archives
%berk.msh% support for Berkeley Utils
%wildrun.msh% wildcards on command line (by J.Pirnay)
" (help_menu) 0 2 "hv: Select file you would like to browse "temp_menu)hmenu0!
|
(prog_dir swap makename read normal_message help_menu)hread!
((hmenu0)
("Command line actions" "command.hlp"hread)
("Panel actions" "panel.hlp"hread)
("Miscellaneous" "misc.hlp"hread)
("Mi-Shell Default FKey Assignments:" "fkey.hlp"hread)
("Mi-Shell Default Letter Key Assignments:" "alpha.hlp"hread)
("primitiv.msh"loaddefs help_menu)
("stdhlp.msh"loaddefs help_menu)
("Wildrun Actions" "wildrun.hlp"hread)
("demo.msh"loaddefs help_menu)
("demo2.msh"loaddefs help_menu)
" Help is available
on the following topics
%look at the msh doc and cfg files%
%command line control%
%directory panel control%
%special features%
%Fkey assignments%
%alpha key assignments%
CtrlF1 %list of primitives and their description%
AltF1 %list of std. defs.%
%syntax for wild cards on command line%
%intoductory tutorial%
%advanced tutorial%
" () 0 2 "hv" temp_menu)help_menu!
|
| ┌────────────┐
| │ Magic menu │
| └────────────┘
|
| show state of magic switch -- if activated call "swapping type" menu
|
( (swap_menu)magic dup (dup 1 1 substring "*"=
("*"cutfirst swap drop ("% D%")("% %")ifelse)
(drop"%XD%")ifelse)(drop"%X %")ifelse
() 78 0 "" permanent_menu magic_menu_no!)
magic_menu!
| ┌───────────────┐
| │ swapping menu │
| └───────────────┘
|
( magic_menu_no window.uninstall
(false magic!magic_menu)(tmp_dir magic!magic_menu)
("*"tmp_dir&magic!magic_menu)("*"magic!magic_menu)
" What type of swapping do you want:
%XMS% (default)
%to directory "tmp_dir&"% if no XMS
%to directory "&tmp_dir&"% always
%no swapping%"&
(magic_menu) 30 4 "hv" temp_menu)swap_menu!
|
| ┌────────────────────────────────────────────────┐
| │ toggle between one-line and two-line main menu │
| └────────────────────────────────────────────────┘
|
( menu_line 0=(1 menu_line!)(0 menu_line!)ifelse
(panel.startrc swap menu_line 0= ("-1")(1)ifelse + swap panel.startrc!
panel.rc swap menu_line 0= (1)("-1")ifelse + swap panel.rc!
)loop_panels
main_menu_no window.uninstall show_menu clock
)toggle_menu!
|
( menu_line 0=
| ┌───────────────────────┐
| │ Main menu -- 1 line │
| └───────────────────────┘
|
((help_menu)(fmenu)(vmenu)(imenu)(CtrlW)(pmenu)(personal_menu)(qmenu)
"F1%Help% %Files% %View/edit% %mIsc% %Whereto% %Panel% %Special% F10%Quit% "
() 0 0 "" permanent_menu main_menu_no!
0 menu_line!)
|
| ┌───────────────────────┐
| │ Main menu -- 2 lines │
| └───────────────────────┘
|
((help_menu)(select_on_off)(browse_current)(editor current.name & exec)
(copy_files)(move_files)(yourmenu)(delete_files)(reconfig)(qmenu)
(ascii)(selected_fit_other)(od)(toggle_menu)
(true capt_screen)(ls_hide)(dosmenu)(delta) (whereto)(swap_menu)
"F1 %Help% F2 %sel% F3 %view% F4 %edit% F5 %copy% F6 %mv% F7 %menu% F8 %del% F9 %cfg% F10 %Quit%
Shft %asci% %fito% %hex% %½ menu% %screen% %ls-hide% %DOS% %delta% %Whereto% %magic%"
() 0 0 "" permanent_menu main_menu_no!
1 menu_line!)
ifelse
)show_menu!
|
(main_menu_no window.activate)main_menu!
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||