Comment ========================================================== Copyright 1990-94 by Marc Perkel * All right reserved. This menu is a sample of a Novell ready menu. You can easilly modify it to suit your needs. To add a choice to a menu simply use the AddChoice command then add the appropiate Onkey statement. The menu will make the size adjustments accordinaly. Example: AddChoice("Print Console",10) ... ... OnKey Task(10) PConsole ... If you want to change the menu's center, pass the XY coordinates to menu's CenterStretchBox procedure. Example: CenterStretchBox("Menu Header",40,12) This will cause the menu to center at Col 40, Row 12 Instead of defining the center of the box, there is a command CornerStretchBox where the box grows down and right. Example: CornerStretchBox("Menu Header",8,6) To control custom features, edit CUSTOM.INC and other INCLUDE Files. ========================================================= EndComment ;------ Create Variables var NovVar KeepUsersInMenu KeepUsersInMenu = False ;set to True if you want to lock in users ;------ Personalize Your Screen Messages StatusLineText = 'Your Company Name Here' MenuTitle = 'Computer Tyme Master Menu' Comment ========================================================== If you want to branch to a personal menu then this routine test for the existence of a menu in the users H: directory with the same name as the users login name. It then sets an environment variable indicating if it was found. This keeps the menu fast because the test need only be made once. ========================================================== EndComment ;------ Load menu look and feel include files Include 'CUSTOM.INC' Comment ================================= In order to add menu choices conditionally you would append the choices to the end of the array after all the default choices are set. For Example: if InGroup("ACCOUNTING") AddChoice("Payroll Menu",10) endif Here is where menus are created. ================================= EndComment ;=============[ Main Menu ]============* AddChoice('Accounting',1) AddChoice('Word Processing',2) AddChoice('SpreadSheet',3) AddChoice('DataBase',4) AddChoice('Communication',5) AddChoice('Sub Menu ...',6) AddChoice('Utilities ...',20) if PersonalMenu > '' then AddChoice('Personal Menu',25) if not KeepUsersInMenu AddChoice('~X. Exit Menu') endif CornerStretchBox ('Main Menu',11,6) OnKey Task(1) ; cd\account ; acc OnKey Task(2) ; cd\wordperf ; wp OnKey Task(3) ; cd\lotus ; 123 OnKey Task(4) OnKey Task(5) OnKey Task(6) ;sub menu ^SubMenu OnKey Task(20) ;Utilities ^Util OnKey Task(25) |Bat 'Marx ' + PersonalMenu OnKey 'X' |LeaveMenu OnKey ESC |if not KeepUsersInMenu | LeaveMenu |endif :SubMenu AddChoice('First Choice',1) AddChoice('Second Choice',2) CornerStretchBox ('Sub Menu',43,6) OnKey Task(1) OnKey Task(2) ;=============[ Utilities ]============* Include "UTILS.INC"