Maxmenu Automatic Menugenerator for maximus 3.0 Version 1.0 Contents 1. Introduction .............................................1 1.1. System Requirements.................................2 1.2. Installation for OS/2...............................3 1.3. Installation for DOS................................4 1.4. Including your own menus............................5 1.5. Quirks..............................................6 1.6. Files in the package................................7 2. Credits...................................................8 Page 1 Introduction Maxmenu is a bunch of mex scripts for Maximus 3.0 which enables the Sysop of a Max 3.0 system to automagic generate different menus. These menus can be 3dansi, Pulldown, Lightbar, generic maximus like menus or even weird looking menus. In some menus the helplevel of the user is also supported and some menus doesn't show the Yell option for nerds. Maxmenu reads all information it needs out of the Max 3.0 internal *.mnu structures and builds on this informations his own menus. So you can add new menuoptions without editing your ANSI menus, they will be added automagic after you run silt max -m Page 2 System Requirements There are two *.zip files included in this package OS2.ZIP is for all Sysops which run OS/2 DOS.ZIP is for those who run Maximus under DOS or in an OS/2 Dos window. I have to split up maxmenu cause the Dos version supports ony 64Kb Codesegement this means the OS/2 version would compile correct under Dos but will not run. Page 3 Installation for OS2 To be save create an subdir like c:\max\m\maxmenu and unzip Maxmen*.zip in this subdir. Then unzip the OS2.ZIP. Then compile the maxmenu.mex with mexp -h65000 maxmenu.mex If you have the DEBUG switch in maxmenu.mex enabled you will have to compile with mexp -s65000 -h65000 maxmenu.mex copy the *.vm files to your max\m subdir Then edit your menus.ctl the best choice is if you take at the beginning only one menu like the MEX menu to fool around. Menu MEX0 Title MEX SAMPLES (%t minutes left) HeaderFile Misc\MexInfo MenuFile :m\maxmenu_mex0.mnu_5 .... End Menu You see the only difference is the Menufile statement MenuFile :m\maxmenu_mex0.mnu_5 where _mex0.mnu is the name of the menufile, if you have a Menu Mex the menufile would be mex.mnu. The second parameter in this example _5 (optional) is the menutype the user always gets and which cannot be overwritten by the user it's mandatory. You can also leave _5 out so the user can define the menus he likes by himself. Switches in Maxmenu.mex: You have a few options in maxmenu.mex #define MINSPEED 0 This is the minimum Baudrate the user gets a standard Maximus menu if you write #define MINSPEED 2400 all users with 2400 baud or lower will get standard menus #define BBSMENUTYPE 1 This defines the Menutype all users will get if they don't decide in change setup to take an other menutype. DON'T CHANGE THE ORDER OF THE #DEFINES IN MAXMENU.MEX AS LONG AS YOU ARE NOT REALLY SHURE WHAT YOU ARE DOING. NOTE: MEX IS CASE SENSITIVE, THERE IS A DIFFERENCE BETWEEN LOWER AND UPPERCASE User defined Menus: The user has the ability to choose the menus by himself if they are not overwritten with maxmenu_????.mnu_x by the sysop. To enable this feature you need some free Keys for maxmenu.mex the keys 1 2 3 4 5 6 are defined if you use this keys for other purposes you will have to edit the m-change.mh file first. on line 35 in m-change.mh you find USERKEYS := "123456"; so if you have only userkey ABQRDF free then write USERKEYS := "ABQRDF"; and compile maxmenu.mex as written above. Then you have to edit the change section in your menus.ctl and insert an extra option. Menu CHANGE0 ..... MEX M\maxmenu_CONFIGURE Demoted "+Change Menutype" ..... End Menu You can put this in any menu you want even in *.bbs files if you like. With the _CONFIGURE switch you tell maxmenu that he should go in configure Mode. The user will be asked what menu he would like to use in the future and he will get an example of the menu displayed. At the moment maxmenu supports only one RIP style menu if you want to use your own rip menu then uncomment #define NORIP in maxmenu.mex edit your menus.ctl Menu MEX0 Title MEX SAMPLES (%t minutes left) HeaderFile Misc\MexInfo MenuFile RIP MenuFile :m\maxmenu_mex0.mnu .... End Menu Page 4 Installation for DOS To be save create an subdir like c:\max\m\maxmenu and unzip Maxmen*.zip in this subdir. Then unzip the DOS.ZIP. Then compile the 1-menu.mex with mex 1-menu.mex Then compile the 2-menu.mex with mex 2-menu.mex Then compile the 3-menu.mex with mex 3-menu.mex Then compile the 4-menu.mex with mex 4-menu.mex Then compile the 5-menu.mex with mex 5-menu.mex Then compile the 6-menu.mex with mex 6-menu.mex copy the *.vm files to your max\m subdir. Then Edit your menus.ctl the best choice is if you take at the beginning only one menu like the MEX menu to play around. Menu MEX Title MEX SAMPLES (%t minutes left) HeaderFile Misc\MexInfo MenuFile :m\r-menu_mex.mnu RIP MenuFile :m\1-menu_mex.mnu .... End Menu If you want userdefinable menus then Menu MEX Title MEX SAMPLES (%t minutes left) HeaderFile Misc\MexInfo MenuFile :m\r-menu_mex.mnu RIP MenuFile \max\misc\mex.bbs .... End Menu The mex.mec looks like this. [ifkey]1 [Mex]m\1-menu mex.mnu [ifkey]2 [Mex]m\2-menu mex.mnu [ifkey]3 [Mex]m\3-menu mex.mnu [ifkey]4 [Mex]m\4-menu mex.mnu [ifkey]5 [Mex]m\5-menu mex.mnu [ifkey]6 [Mex]m\6-menu mex.mnu [notkey]123456 [Mex]m\1-menu mex.mnu you will need for every menu a bbs file Then edit the change Menu in your menus.ctl Menu CHANGE ... Display_File \max\misc\menu_aus Demoted "+ Menu-Select" ... End Menu The menus_aus.mex file looks like this [cls] [yellow]Menuscreen Settings : [lightcyan]Select the menu you like [yellow]1,2,3,4,5,6 or Q for QUIT [white]Select: [gray menu]123456Q [choice]1[cls][goto MENU_1] [choice]2[cls][goto MENU_2] [choice]3[cls][goto MENU_3] [choice]4[cls][goto MENU_4] [choice]5[cls][goto MENU_5] [choice]6[cls][goto MENU_6] [choice]Q[cls][QUIT] [top] [/MENU_1] [cls link] [Mex]m\1-menu change.mnu [locate 22 10][white enter] [locate 23 10][yellow]use this menu in the future ? [[Y,n]? [gray menu]yn| [choice]n[cls Top] [choice]y[cls keyoff]123456 [keyon]1 [goto Next] [/MENU_2] [cls link] [Mex]m\2-menu change.mnu [locate 22 10][white enter] [locate 23 10][yellow]use this menu in the future ? [[Y,n]? [gray menu]yn| [choice]n[cls Top] [choice]Y[cls keyoff]123456 [keyon]2 [goto Next] [/MENU_3] [cls link] [Mex]m\3-menu change.mnu [locate 22 10][white enter] [locate 23 10][yellow]use this menu in the future ? [[Y,n]? [gray menu]yn| [choice]n[cls Top] [choice]Y[cls keyoff]123456 [keyon]3 [goto Next] [/MENU_4] [cls link] [Mex]m\4-menu change.mnu [locate 22 10][white enter] [locate 23 10][yellow]use this menu in the future ? [[Y,n]? [gray menu]yn| [choice]n[cls Top] [choice]Y[cls keyoff]123456 [keyon]4 [goto Next] [/MENU_5] [cls link] [Mex]m\5-menu change.mnu [locate 22 10][white enter] [locate 23 10][yellow]use this menu in the future ? [[Y,n]? [gray menu]yn| [choice]n[cls Top] [choice]Y[cls keyoff]123456 [keyon]5 [goto Next] [/MENU_6] [cls link] [Mex]m\6-menu change.mnu [locate 22 10][white enter] [locate 23 10][yellow]use this menu in the future ? [[Y,n]? [gray menu]yn| [choice]n[cls Top] [choice]Y[cls keyoff]123456 [keyon]6 [goto Next] [/Next] [top] Page 5 Including your own menus If you want to include or generate menus of your own you must be able to understand the MEX programming. All menus are stored in the m_*.mh files look in maxmenu.mex for the #include // my 3d menu #include // a drop down 3d menu #include // a maximus standard menu #include // Matt Scott 1:3401/306 menus #include // a blue menu #include // a borg like menu and take the menu who fits most your menu as example for generating your own menu. If you have problems with mexprogramming then you can also send me your menu as *.bbs or *.ans file and i can try to implement it, if it's not too complicated. Page 6 Quirks There is only one problem if you have a Menuitem with the same key in menus.ctl there is only one Menu and that's the MENU MESSAGE Menu Message .... Local Display_File Hlp\Msg Demoted "?help" Matrix Display_File Hlp\Mail Demoted "?help" Echo Display_File Hlp\Echo Demoted "?help" % End Menu As you can see the Help Option depends on Local,Matrix,Echo so maxmenu will display the user also 3 times ?help to overcome this "bug" you can do the following Menu Message .... Local Display_File Hlp\Msg Demoted "?help" Nodsp Matrix Display_File Hlp\Mail Demoted "?help" Nodsp Echo Display_File Hlp\Echo Demoted "?help" % End Menu Maxmenu will display only one ?help and maximus knows what file to display. If you run under Dos and generate your own menus then be aware that the *.vm file doesn't get bigger than 64000 bytes this is the codesegement limit for mexprograms running under dos and your program will compile but it may not run! If you want to use Lightbar menus, then don't allow the user to use it in the MESSAGE section cause the user will not be able to do numeric input. This will be fixed in the next version. Page 7 Files in this package for both OS/2 & DOS readmnu.mh An include file to read *.mnu files m_schlag.mh The menu used at 2:310/3 since years m_drop.mh Some other 3d Menu m_std.mh A maximus standard menu with some more colors m_mscott.mh The Matt Scott lightbars m_mrip.mh A simple RIP menu m_blue.mh A "blue velvet" menu m_robot.mh A "weird borg like" menu m-gen.mh include for Matt Scott Lightbars xgetch.mh getkey routine for Matt Scott Lightbars OS/2 maxmenu.mex The mainprogram for OS/2 m-change.mh The include for user definable menus m_debug.mh An include file for Debug options 3dmenu.mh Structs and colors DOS 1..6 ?-menu.mex 6 different menus r-menu.mex the rip menu m_lowmem.mh include with a lot of switches to keep the *.vm under 64kb with structs and colors. Page 8 Credits Thanx to Scott Dudley for Maximus and the Mex concept. Thanx to my Betatester which gave me some ideas and showed me some bugs. Thanx to Matt Scott for the code he postet in the MECCA echo. Thanx to L.v.Beethoven for the music in the background. You can do with maxmenu whatever you like as long as you don't use it for military, political or profit reasons. I am not interested in registration stuff or sitting on the code. If you find any Bugs let me know, if you implement new features or menus then please send me some sample code so i can implement it in the next version and the whole maximus community gets a profit. You can reach me via netmail at 2:310/3.0 2:310/2.0 or voice ++43-1-60103/3707 (8:30-19:00 CET) or postcard Werner Schlagnitweit Rosa-Luxemburggasse 1-9/19/11 1160 Vienna Austria