home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
util
/
menu
/
010
/
quicknov.mnu
< prev
next >
Wrap
Text File
|
1992-12-01
|
4KB
|
176 lines
Comment
==========================================================
Copyright 1990-92 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
MyServer = NovDefaultServer
Station = Str(NovConnection)
UserName = NovMyLoginName
;------ Read network address
NetAddress = NovStationAddress (NovConnection)
;------ Personalize Your Screen Messages
StatusLineText = 'User: ' + UserName + ' * Server: ' + MyServer
StatusLineText = StatusLineText + ' * Address: ' + NetAddress
if length(StatusLineText) < 64
StatusLineText = StatusLineText + ' * Dos: ' + DosVersionString
endif
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
;------ Set Personal Menu if Environment Variable PMENU exists.
PersonalMenu = ReadEnv('PMENU')
;------ Load menu look and feel include files
Include 'CUSTOM.INC'
Comment
==========================================================
MarxMenu is capable of software metering. This means that it can limit
the number of users of an application to a fixed amount.
OnKey Task (2)
|if Limit('LOTUS',6) then Return ;limit Lotus to 6 Users
CD \PUBLIC\LOTUS
123
Read the METER.INC file for more details.
==========================================================
EndComment
Include 'METER.INC' ;Software Metering
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('Utilities',20)
if PersonalMenu > '' then AddChoice('Personal Menu',25)
CornerStretchBox ('Main Menu',11,6)
OnKey Task(1)
|Error('Put Code for Accounting here.')
; cd\account
; acc
OnKey Task(2)
|Error('Put Code for Word Processing here.')
; cd\wordperf
; wp
OnKey Task(3)
|Error('Put Code for SpreadSheet here.')
; cd\lotus
; 123
OnKey Task(4)
|Error('Put Code for DataBase here.')
OnKey Task(5)
|Error('Put Code for Communication here.')
OnKey Task(20) ;Utilities
^Util
OnKey Task(25)
|Bat 'Marx ' + PersonalMenu
OnKey ESC
|if NovConsoleOperator or not KeepUsersInMenu
| LeaveMenu
|endif
;=============[ Utilities ]============*
Include "UTILS.INC"