Contents

About MangoMenu

Installing MangoMenu

3D Dialogs

Scripts

@statements

$commands

*modifiers

Common Problems


About MangoMenu
MangoMenu, Version 2.2

Distribution

Changes

Limits and Problems

MangoMenu is an application that can be used to replace the Task Manager for Windows 3.1. When MangoMenu is installed, if the user double clicks the desktop, or types CTRL+ESC, a popup menu is displayed under the mouse’s pointer (or somewhere in the vicinity of the window that has the focus), rather than the Task Manager’s dialog box.

This menu is fully scriptable, so the user can switch to any of the currently running applications, start applications, open documents, or perform other commands (such as activate the screen saver, or exit Windows) that are built into MangoMenu.

In addition, MangoMenu can replace the Program Manager as the shell application, which frees up all the memory and system resources held by the Program Manager.

MangoMenu does not pretend to change the entire Windows interface; it merely enhances one, relatively small, section of the Windows interface, with as few frilly extras as possible.

 MangoMenu requires a 386 or higher, and Microsoft Windows 3.1.


Distribution

MangoMenu 2.2 is FreeWare: it is distributed as a fully functional application with no strategically missing features, nor any sickening pleas for money. It may be copied, distributed and used with wild abandon, provided that it is copied and distributed in its entirety, unchanged (obviously, no one cares if you only use one part of MangoMenu, or modify your copy in some way). If you find MangoMenu useful, share it with your friends.

If you use MangoMenu, you are encouraged to send a postcard to me at the address below, especially if you have found any bugs, or have any suggestions for improvements. Postcards allow me to estimate how many people use MangoMenu, and whether further development is warranted.

MangoMenu consists of the following three files:

MANGO.EXE

MANGO.HLP

AVOHOOKS.DLL

If you have downloaded an incomplete version of MangoMenu, please send hate mail to the operators of the bulletin board from which you downloaded it, berating them for their lack of diligence.

Warranty Disclaimer
Robb Horn (The Author) makes no warranty of any kind,  expressed or implied, including (without limitation) any warranties of fitness for a particular purpose. In no event will the author be liable for any incidental or  consequential damages arising from the use of, or inability to use, this program, even if the author, or an agent thereof, has been advised of the possibility of such damages. In no event shall the author’s liability for any damages ever exceed $1, regardless of the form of the claim. The user of the software bears all risk as to the quality and performance of the software.

In short, this software is distributed “as is”.

Please send any comments and/or bug reports to:

Robb Horn
3165 St. Paul Blvd.
Rochester, NY 14617

CompuServe: 75717,3210


Limits and Known Problems

•	Your menu may not contain more than 256 commands; menu items corresponding to additional commands are quietly dropped. Likewise, commands may be no more than 255 characters (I believe Windows sets a lower limit due to DOS), and menu text may be no more than 255 characters.

•	MangoMenu makes no attempt to make sure that the popup menu is short enough to fit on the screen. If icons are enabled in the task list, the menu can quickly outgrow the screen.

•	MangoMenu can only track 16 windows marked with the *noshow modifier. If you have an exceptionally large number of applications running, marked with the  *noshow modifier, the *noshow modifier will be ineffective.

•	MangoMenu can only handle about 12 @startup statements. Further statements are ignored. This should be more than enough for most users.

•	If your script file is greater than 10,000 bytes long, MangoMenu will not attempt to load it, and will (quietly) use the default script instead.

•	MangoMenu generally will not notify the user of errors, preferring to quietly deal with the situation.

•	The timeout value, specified via the @timeOut statement cannot be longer than 30 seconds. If it is specified as longer than 30 seconds, MangoMenu will use 30 seconds.

•	The existence of @magic. The fact that this kludge is a configurable kludge does not mean that it is fine.

•	A Visual Basic application with multiple forms can appear to MangoMenu as multiple applications. This is not at all harmful, merely somewhat peculiar.

•	If MangoMenu is started by double-clicking on the desktop, sometimes MangoMenu will not activate the single-click feature. Windows appears to sporadically believe that the shift key is held down during a double click. If you are not using MangoMenu as your shell, place MangoMenu in your Program Manager’s Startup group.

•	If you quickly double click (or click if you have the single click feature enabled) on the lower half of the desktop, MangoMenu will appear to choose a menu item at random.

This only happens when the height of the popup menu is greater than the distance between the mouse and the lower edge of the screen. In these cases, Windows will move the menu up, so that it fits entirely on the screen, causing it to interpret the mouse release as the user selecting a menu item (which may or may not have been drawn yet).

The solution to this problem is to hold the mouse button down after you double click (or click), and then make your selection.


Changes

Changes for Version 2.2

•	Added support for CTL3D.DLL and CTL3DV2.DLL, which gives MangoMenu’s dialogs that nifty 3D look. MangoMenu will use either if available, but works fine if neither are.

•	Added the trim flag to the @tasks statement, which causes MangoMenu to trim the document information from an application title, if this would not cause ambiguity.

•	Integrated the functionality of Avocado!, adding the single click check box to the Setup dialog.

This reduces the memory usage of MangoMenu if you are using the single click functionality.

•	The single click feature (previously known as Avocado! now responds to either the left or right mouse button.

•	Changed the icon retrieval code so it is less dependant on other applications behaving as they should.

•	Added an actual installation program.

Changes for Version 2.1b

•	When removing MangoMenu, MangoMenu will now restore the shell and task manager settings to what they were when MangoMenu was installed, not the Windows 3.1 defaults.

•	If you have deleted either the program manager (PROGMAN.EXE), or the file manager (WINFILE.EXE), they will not be listed on MangoMenu’s system menu.

•	Improved handling of the palette.

•	Added code that should fix a bug involving applications that suddenly force themselves to the front (violating most reasonable user interface guidelines), that could cause MangoMenu to hang.

Changes for Version 2.1a

•	When building the task list, MangoMenu now checks to see if a top level window has a height and width of 0. This accounts for a peculiarity of Visual Basic applications that made them appear twice.

•	Fixed a minor bug with the *noshow modifier.

•	Improved version of Avocado!.

•	Set focus to the proper field on the Browse dialog, accessible from the Run dialog.

Changes for Version 2.1

•	MangoMenu can now set itself up, freeing the user from having to fiddle about with SYSTEM.INI. Unfortunately, this increases the size of MangoMenu at all times.

•	Added icons to the task list and MangoMenu’s system menu (that little menu on the MangoMenu icon).

•	Changed the Run dialog, replacing the edit control for the command line with a combo-box, allowing the user to enter a command, or quickly use one of the last five commands.

•	Added the @font statement, which allows the user to select a font for dialogs.

•	Added the *noshow modifier to MangoMenu’s command interpreter. This allows the user to open applications without having that application appear in MangoMenu’s task list.

•	Improved handling of menu display along the right edge of the screen. If the menu would not fit on the screen centered horizontally about the mouse, it is now right aligned with the right edge of the screen, rather than right aligned with the mouse (so the mouse is within the menu).

•	Added the SetUp dialog, and the $setup command.

•	Changed name to MangoMenu. The previous name, which shall remain nameless, was already in use by another product.

•	MangoMenu will no longer read the script file each and every time the user activates it. It will now first check to see if the script file has been changed, and only change the task portion of the desktop menu if the script file has not been changed. This decreases the response time.

•	MangoMenu will now execute commands in @startup statements one at a time, from its message loop. This helps ensure that applications start properly.

•	Dialog boxes now appear in the font Helv 8, rather than Arial 9. This should reduce the burden upon system resources, as this font commonly used by other applications (and the standard dialogs), and Windows should not need to load it again.

•	Removed the Auto-Minimize feature, as it proved to be annoying.

•	The menu item for starting the screen saver is no longer dimmed if the user has not selected a screen saver; MangoMenu prefers to alert the user via a dialog box, when the menu item is chosen.

•	Altered the About dialog, removing the more tacky elements and colors. It now appears in a subdued color scheme, blending colors selected in the Color control panel.

Changes for Version 2.0

•	MangoMenu now remains running at all times. This makes it more responsive to the user activating it (since it does not have to be read from the disk). This also fixes problems with applications that expect the application that launched them to remain running for a few moments (Symantec Execution Monitor is the only known example).

•	The tasks displayed in the menu may now be sorted and numbered. In addition, MangoMenu may be left off the task list, and the currently running application’s menu item has a check mark by it.

•	By default, MangoMenu now sets the current directory to be the directory that contains the application or file that it is opening. Previous versions of MangoMenu always set the directory to be the Windows directory.

•	The About dialog (with the ever important copyright information), the Run dialog, the Program Manager and the File Manager are all accessible via the MangoMenu icon’s menu, so the most basic commands are always accessible, even if the script has been mangled.

•	When MangoMenu is activated via the keyboard, it will generally attempt to position the menu and dialog boxes somewhere in the vicinity of the center of the window you are using, rather than near the mouse. This is generally where you expect it to appear.

•	A timeout value can now be specified via the @timeOut statement. This allows the user to specify a maximum amount of time that the popup menu will be displayed.

•	The $newScript and $oldScript commands have been added, to ease the management of script files. When a script is created, the user now has the option of choosing the name of the file; this fixes problems that occurred when MANGO.MGO already exists.

•	Since the About dialog box is now accessible via the MangoMenu icon’s menu, the background menu does not have an about item forced upon it.

Changes for Version 1.1.1

•	Added more @statements, so it is never necessary to use a $command in the script file.

•	Added support for the tilde (~) as an escape character in menu scripts, allowing the use of special characters in commands and menu text.

Changes for Version 1.1

•	The original scripting language has been replaced with a far more regular and consistent language.

•	It is now possible to force the About dialog box to appear in the default colors.

•	Avocado, a separate, optional application that makes Windows believe that a single click in the desktop is actually a double-click — which causes MangoMenu to respond to a single click — is included.

•	The magic number used to calculate menu width (for positioning the menu) is now adjustable. This should ease interaction with strange applications and DLLs that modify the way Windows draws menus.

Changes for Version 1.0.1

•	MangoMenu now properly handles applications that change the title of their main window while MangoMenu’s menu is displayed (for example, a mouse odometer).

•	When activating an application, MangoMenu will not restore the application’s main window if it was maximized. MangoMenu also now sends a SC_RESTORE message rather than using ShowWindow; this is what the Task Manager does, and some applications depend upon this behavior.


Installing MangoMenu

MangoMenu is installed and removed using the SetUp dialog box, accessible through MangoMenu’s About dialog, or by typing $setup in the Run dialog.

Using MangoMenu as the shell application causes MangoMenu to execute any @startup commands in its script as it starts, and can save quite a bit of memory by not running the Windows Program Manager. If there are no @startup statements in the script file, or if they all fail to open other applications, MangoMenu will open the Program Manager.

If the SHIFT key is held down as MangoMenu is started, MangoMenu will ignore all @startup statements, and only launch the Program Manager. This is useful when an application has become corrupted.

MangoMenu cannot be used as the shell unless it is active.

The single-click feature, previously implemented as Avocado!, a separate application, allows MangoMenu to respond to a single click upon the desktop, rather than a double click. This feature bypasses chunks of Windows, and can interfere with other applications that are attempting to do something similar, or even with future versions of the operating system.

This feature may be disabled by holding down the SHIFT key while MangoMenu is starting. If you encounter problems with using this feature, restart your computer and MangoMenu while holding down the SHIFT key, and disable this feature.The single click feature has been tested on the most common versions of Windows available at the time of this application’s release (Windows 3.11, Windows for Workgroups, and win32s), and has not been found to cause any problems.

Note:
MangoMenu will change the shell and taskman.exe lines of your SYSTEM.INI file if the settings in the SetUp dialog are changed. These changes will not take effect until the system is restarted, so MangoMenu will offer to restart Windows after changing either of these items.

When deactivating MangoMenu, the shell and taskman.exe lines of the SYSTEM.INI file are reset to use the Task Manager and the Program Manager, or whatever you were previously using.


Scripts

MangoMenu’s menu is built from a script, either contained within MangoMenu (if the user has not chosen to modify the script), or in a file most likely named MANGO.MGO (if the user has a custom script).

The default script (comments added):

;; comments start with a pair of semicolons

;; and extend to the end of the line

@systemMenu {icons}

@notepad

@about    ;; add about item

@separator  ;; add horizontal line

;; NOTE: Windows treats the & character in

;; menu items special — it makes the next

;; character a short cut key

&Managers

{

;; Begin a sub-menu

&Programs {progman}

&Files {winfile}

&Tasks {taskman}

P&rinting {printman}

@separator

Setup {setup}

@separator { }

&DOS Prompt {dosprmpt.pif}

}

&Control Panel

{

&Color {control color}

&Desktop {control desktop}

&Fonts {control fonts}

&Mouse {control mouse}

&Printers {control printers}

@separator

&Other... {control}

}

&Programs

{

&1 Calculator {calc}

&2 Character Map {charmap.exe}

&3 Notepad {notepad}

&4 Paint Brush {pbrush}

&5 Write {write}

}

@separator

@tasks {check, icons, sort, !self}

@separator

@run

@screensaver

MangoMenu’s scripting language has three types of statements: @statements, menu items, and sub-menus (also called popup menus).

An @statement is a directive to MangoMenu to control how it builds the menu. If an @statement has any arguments, they follow the @keyword, enclosed in curly braces; if there are no arguments, the curly braces may be omitted. @statements are interpreted as MangoMenu builds the menu. There may not be a space between the @ and the keyword.

A menu item consists of the menu text (the text that will appear in the menu), followed by the command that will be executed when (and if) the user chooses that menu item, enclosed in curly braces. The command is interpreted by MangoMenu only when the menu item is chosen by the user; if there is an error in the command, MangoMenu will display a dialog box when (and if) the menu item is chosen.

A sub-menu consists of the sub-menu’s title (which will appear in the parent menu), followed by an open curly brace, a list of statements to build the sub-menu, and a close curly brace.

MangoMenu will strip excess whitespace (spaces, tabs, linefeeds, et cetera) from chunks of text (menu items and commands) as follows: leading and trailing whitespace is removed; whitespace between words is condensed to a single space. This allows statements to be on separate lines, and allows a sub-menu statement to be broken into several lines (perhaps one per menu item), and in general will prevent nasty characters from appearing in the menu.

Special characters may be embedded within a chunk of text by preceding the special character with a tilde (~). Special characters that require this treatment would be: tabs, newlines, curly braces, leading @ symbols, and (of course) tildes. To enclose a pair of semicolons, place a tilde between the semicolons, so they are not interpreted as the start of a comment.

A command (the text executed when a menu item is chosen) may be one of two things: a Windows command line (like those found in the Run and Properties dialog boxes of the Program Manager — often simply the name of a file or application); or, a MangoMenu built-in command, which will start with a $.

If you want your command to automatically open an application or document in a particular state (minimized (iconic), normal, or maximized (zoomed)), you can include a *modifier at the beginning of the command. A command to open the application WeaselWorks™ could be:
*min: weasel.exe

If you want the current directory for a command to be something other than the default (where ever the application or file being opened is located), you can explicitly set the current directory by including it in double square brackets at the end of your command. The current directory is where the application will look for files, and where the Open... dialog box will initially be looking. As an example, if you wished to open the application WeaselWorks™ setting the current directory to be C:\DOCUMENT\S_THAT_I\LIKE, use the following:
weaselwx.exe [[C:\DOCUMENT\S_THAT_I\LIKE]]

Some applications will get confused if they require files in their own directory and they assume that the current directory is their own directory. Most applications do not make this assumption.

@statements, $commands and *modifiers are identified by the first three letters, with upper and lower case letters being treated the same. Thus, @about, @ABO, and @abomination are all the same.

@statements

$commands

*modifiers

Common Problems


@statements

An @statement is a directive to MangoMenu to control how it builds the menu. If an @statement has any arguments, they follow the @keyword, enclosed in curly braces; if there are no arguments, the curly braces may be omitted. @statements are interpreted as MangoMenu builds the menu. There may not be a space between the @ and the keyword.

For almost every $command, there is a corresponding @statement, since the use of both $commands and @statements has been found to be cumbersome, if not actually confusing. Because @statements are interpreted while the menu is being built, this also allows special handling of some menu items.

@about {about, color, help, script}
Adds the “About MangoMenu 2.1...” item to the menu, and/or adjusts flags that affect how the About dialog box is displayed.

The @about statement recognizes the following flags:

about Inserts a menu item that will bring up the About dialog box when chosen.

color Causes the About dialog box to be drawn in non-default colors (nothing overly exciting though).

help Makes the Help button visible in the About dialog.

script Makes the Script button visible in the About dialog.

setup Makes the SetUp button visible in the About dialog.

By default, each of these flags is turned on — flags can be turned off by preceding them with an exclamation point.

Sample: to remove the Script button and the SetUp button from the About dialog box, without adding an about item to the background menu, you would need to add the following line to your script:
@about {!about, !script, !setup}

@editScript {text}
Inserts a menu item to edit the script file. The menu text is text, if specified, or a default string. This statement uses the $editScript command, which can be disabled in the @about statement.

@exitWindows {text}
Inserts a menu item to exit Windows (posting a dialog first, confirming the users intention). The menu text is text, if specified, or a default string.

@font {TypeFace, size, bold, !italic}
Sets the font used by MangoMenu for its dialogs. By default, this is Helv 8 (also known as MS Sans Serif 8), the same font used by the standard dialogs. Choosing another font may use more memory, since Windows may not already be using that font.

Windows adjusts the size of dialog boxes (and the controls within the dialog boxes) based upon the font used for the dialog box, so even after the font has been changed, the dialog box should appear reasonably nice. Some of the common dialog boxes have controls that do not scale properly, so if the font size is vastly different, the results may be unpleasant.

 	Sample: To make MangoMenu use Times New Roman 10 as its dialog font, add the following to your script file:
@font{Times New Roman, 10, !bold}

Note: Unlike all other @statements, the order of the arguments for this statement is important. The font name, and the font size, must be the first two arguments.

@help {text}
Inserts a menu item to display the help file. The menu text is text, if specified, or a default string.

@magic {int}
MangoMenu estimates the width of the menu (for placement purposes) to be the width of the longest text within the menu, plus a constant (padding on either side of the string, the black outline, that little arrow that signals a sub-menu). MangoMenu guesses the value of this constant to be 35 (determined through empirical testing on my computer). If the menu is shifted too far to the left when the mouse is near the right edge of the screen, you may need to increase this magic number. Because this statement does not create any menu items, it may appear anywhere within the script.

Yes, this is a kludge, but it’s an adjustable kludge.

@minimizeOthers {text}
Inserts a menu item to minimize all applications except the currently executing application. The menu item’s text is text, if specified, or a default string.

@notepad {editor}
By default, MangoMenu will use Notepad to open the menu script. If you despise Notepad, you can use this statement to specify another text editor. This cannot by Write or another word processor, since they add strange formatting characters.

Sample: To use WeaselWorks™, with the text only flag, you would need to add the following statement to your script:
@notepad {weasel /t}

@reboot {text}
Inserts a menu item to reboot the computer (posting a dialog first, confirming the users intention). The menu text is text, if specified, or a default string.

@restartWindows {text}
Inserts a menu item to restart Windows (posting a dialog first, confirming the users intention). The menu text is text, if specified, or a default string.

@run {text}
Inserts a menu item to display the Run dialog box, which is very similar to the Run dialog box in the Program Manager. The menu text is text, if specified, or a default string.

@screenSaver {text}
Inserts a menu item (with menu text text, if specified, or a default string), that will activate the screen saver when chosen.

@separator
Inserts a separator into the menu.

@startup {command}
If MangoMenu is run as the shell application, rather than building and displaying the menu, it will execute any commands specified in @startup statements.  @startup statements are ignored when MangoMenu is run normally. There may be more than one @startup statement, and they may appear anywhere within the script.

@systemMenu {icons}
Sets flags for determining how MangoMenu’s system menu (the menu attached to the MangoMenu icon) is drawn. This statement takes the following flags:

dainty If the icons flag is enabled, this reduces the icons to 1/2 their original height and width (1/4 of their original area). This is generally unpleasant to look at.

icons Places icons next to some of the menu items. The icon is generally taken from the application listed.

small If icons is enabled, this flag will reduce the icons to 3/4 of their original height and width (or 9/16 of their original area). This is almost never pleasing.

By default, icons is enabled.

@tasks {check, icon, !number, self, !sort}
Inserts one menu item for each currently running application, using the title of the application’s main window as the menu text. Choosing any of these items causes the application’s main window to be selected, restoring the window, if it was minimized.

The @tasks statement recognizes the following flags:

check Places a check mark next to the currently running application in the task list.

dainty If the icons flag is enabled, this reduces the icons to 1/2 their original height and width (1/4 of their original area). This is generally unpleasant to look at.

icons Places icons in the task list. The icon is generally taken from the application listed.

number Numbers the first 9 applications in the task list and allows them to be selected quickly using the keyboard. If you are running more than 9 applications, the later applications will appear as they would normally.

self Include MangoMenu within the task list. Generally, it is removed to conserve space.

small If icons is enabled, this flag will reduce the icons to 3/4 of their original height and width (or 9/16 of their original area). This is not always pleasing to the eye, but it offers an alternative to no icons for users who run many applications simultaneously (large icons will quickly fill the screen)

sort sorts the task names alphabetically.

trim trims the document information from task names (i.e., “File Manager” instead of “File Manager - [C:\WEASELS\SYSTEM\*.*]”), unless this information is required to uniquely identify the task (multiple copies of Notepad editting different files, for example).

By default, dainty, small, self and number are turned off, while check, icons and sort are turned on.

@timeOut {arg}
Specifies the approximate maximum time that MangoMenu’s popup menu will be displayed. If arg is a positive integer, the menu will be displayed for no more than roughly arg seconds. Otherwise, the menu will be displayed indefinitely. The default setting is 30 seconds. A limitation in this version of MangoMenu makes 30 seconds the maximum timeout value, any value larger than 30 seconds will be treated as 30 seconds.


commands
$commands

A $command is a command built into MangoMenu. $commands are useful for performing relatively trivial tasks for which it would be impractical to have a stand alone application, or changing MangoMenu’s settings.

Nearly every $command has a corresponding @statement, which creates a menu item using the $command. Using both @statements and $commands together has been found to be cumbersome, if not actually confusing, so additional @statements were added to make it possible to never use a $command directly.

The only exception to the above are the $setup, $newScript and the $oldScript commands, which should seldom be used, and likely not included in a menu.

$about
Displays the About dialog box. This command is used by the @about statement.

$editScript
Opens the script file using Notepad, or the editor specified using the @notepad statement. If there is no script file, MangoMenu will attempt to create one with the default script.

$exitWindows
Exits Windows, after first displaying a dialog box confirming the user’s intent.

$help
Displays this help file.

$minimizeOthers
Minimize all other applications, except the one that you are currently working with.

$newScript
Create and edit a new script file, selecting the name via the standard save file dialog box, and editing it with the current script editor (which may be changed via the @notepad statement in the MangoMenu script). This script is initially the default script.

$oldScript
Switch scripts to an old script file, chosen using the standard open file dialog box.

$reboot
Reboots the computer (after a dialog box to confirm).

$restartWindows
Restarts Windows (after a dialog box). This is useful only on the rare occasions when the user has modified the SYSTEM.INI file, and needs to restart Windows for the changes to take effect.

$run
Displays the Run dialog box, allowing the user to either type the desired command, or browse the disks looking for the application or document that catches his or her fancy at the moment.

$screenSaver
Activates the screen saver, if the user has selected one in the Desktop control panel. It is preferable to use the @screenSaver command, rather than creating a menu item with this command, as the @screenSaver statement will dim the menu item if there is no screen saver selected in the Desktop control panel.

$setup
Displays the SetUp dialog box, allowing the user to activate or deactivate MangoMenu, or use MangoMenu as the shell application (or not). Changes are confirmed, and MangoMenu offers to restart Windows so that changes take effect.


*modifiers

By itself, a Windows command line does not specify how an application should be opened (minimized, normal, or maximized). As MangoMenu prepares to execute a command, it first checks to see if the command is preceded by a *modifier, which can be used to request how an application or document should be opened (this request is passed to the application, which my or may not honor it).

*modifiers add the functionality of the Window State radio buttons in the Run dialog box to commands within the menu script.

The format of a command with a *modifier is as follows:
*modifier: command
Where modifier is one of the following: minimize, normal, or maximize. The modifiers are case insensitive, and may be abbreviated by their first three letters.

An additional *modifier, *noshow, has been added for MangoMenu 2.1. This modifier, which may be combined with other modifiers, keeps MangoMenu from listing the window(s) created by the command in its task list. This can be useful if the task list contains icons and the user is running a variety of applications that he or she would not likely switch to (for example, a mouse odometer, or eyes that follow the mouse pointer, or Dr. Watson); otherwise, the desktop menu may become overly cluttered and crowded, possibly not even fitting on the screen.

To automatically run Dr. Watson, without adding it to the desktop menu, you might have the following in your MangoMenu Script.

@startup {*min: *noshow: DRWATSON.EXE}

MangoMenu can track up to 16 windows with the *noshow modifier. These windows will still be in the Task Manager’s list of tasks.


Dr. Watson is a small application that monitors Windows applications and attempts to give useful information when an application crashes. This information is generally useless to anyone who doesn’t like assembly language.


Scripts: Common Problems

•	MangoMenu does not handle errors in the script very gracefully; it never attempts to alert the user to an error, acting under the assumption that the user will notice a mangled menu. When it encounters an error, MangoMenu skips all input up to the next closing curly brace. If your menu is missing items, you likely have an error in the statement corresponding to the first missing item.

•	Statements can sometimes appear to be inadvertantly combined. MangoMenu’s scripting language does not recognize the end of a line as being the end of a statement, nor does it have any other way of explicitly separating statements (such as semicolons). This allows the user a great deal of freedom, and only occasionally comes back to bite. It can hide little errors and compound other errors.

A few general rules help fix these situations:

•	If the statement begins with an @command, and the next word is not a open curly brace, the statement ends immediately after the @command.

•	If the statement begins with an @command followed by an opening curly brace, the statement ends immediately after the next closing curly brace.

•	If the statement is a simple menu item, the statement ends immediately after the next closing curly brace.

•	If the statement is a popup menu, the statement ends immediately after the matching closing curly brace (this means that a popup menu statement may (and should) contain other statements).

•	An @command within a chunk of text (even if it appears on the next line) is merely part of that chunk of text. (The @ character is only special at the beginning of a chunk of text)

•	@statements must NEVER have spaces within them.

A friend of mine, with the unfortunate name of I. Offen-Chung, had the following in her script, which caused a great deal of confusion:

@minimize Others
@help {Help}

MangoMenu interpreted these two statements not as @minimize Others and @help {Help}, but rather as @minimize and Others @help {Help}.

The intended help @command became part of a normal menu statement, which ran the application HELP.EXE, the MS-DOS help system, when chosen.


3D Dialogs

MangoMenu 2.2 introduces support for dialogs with that ever popular etched 3D interface. If MangoMenu can find either CTL3DV2.DLL or CTL3D.DLL, it will load and use it for drawing its dialogs.

You can disable 3D dialogs by editting the MANGO.INI file, located in your Windows directory. Add the following two lines to the [mango] section:
CTL3DV2.DLL=0
CTL3D.DLL=0

Alternately, you can keep MangoMenu from searching for just one of these DLLs, if you happen to prefer one for some reason (you run applications that use one, and don’t want to load the other as well).