Huge Collections of Software Manuals and Knowledgebase

GreatManuals.com
Huge Collections of Software Manuals and Knowledgebase

 
Home Contact Us Request to publish your help manuals Request to remove your help manuals
Introduction
» MenuBox
» New Features
Getting Started
» Overview
» MenuBox Wizard
» Sign Project Tool
» Registering MenuBox
» Quality Checklist
Reference
» Command Line Options
» Configuration File Options
» Windowless Mode
» Simple Window Mode
» Browser Window Mode
» MenuBox Extended DOM
» Paths & Current Directory
» AutoRun CDs & DVDs
» Redistributable Files
Additional Resources
» Web Resources
» ISO 639-1 Language Codes
» Windows Character Set Codes
 

MenuBox Extended DOM

Overview

In addition to providing full browser functionality (referred to as "Basic" browser functionality), MenuBox extends the standard browser Document Object Model (DOM) by adding properties and methods which make it possible to open documents, launch applications and quit MenuBox with the same ease and administrative privileges (i.e. without browser-typical confirmation and warning messages) as when MenuBox is running in simple window mode. More in general, these features allow you to use HTML code to build a project that looks and feels to the user more like a full Windows application than an HTML page. This functionality (which is referred to as "Advanced") requires Windows 98 or higher, or Windows 95 or Windows NT 4.0 with at least Internet Explorer 4 (released in September 1997) installed. Code for object detection and fallback under Internet Explorer 3 is also provided.

flash media data recovery usb flash drive restore unerase photos
professional data recovery digital photo restore data recovery tools
memory card picture recovery deleted picture recovery download data recovery software

Extended Document Object Model Reference

In order to overcome the limitations of normal browser containers, MenuBox extends the Dynamic HTML Document Object Model (DOM) so that scripts can access the same document opening and code execution functionality already known from the MenuBox command line, windowless and simple window modes. Such scripts refer to the host by specifying the External object that is available from the Window object. For example, a reference to "window.external.menuboxversion" will call MenuBox to resolve the name "menuboxversion" and return the program version number. All standard script within the HTML document will be executed normally, without being affected by the additional functionality provided by MenuBox.

Methods:

Sub Close()

Closes the MenuBox window.

Sub Execute(File As String, Parameters As String, Directory As String, Verb As String, Show As String, AbsolutePath As Boolean, Wait As Boolean)

Opens a document or executes a file. Paths used by this function are relative to the directory containing the HTML file referenced by the URL key (the first HTML document which is opened), rather than the directory containing the current HTML document, if different. Within an HTML scripting environment, remember to use the applicable escape sequences for any special characters which may be contained in the function arguments (e.g. "\" should become "\\", and double quotes inside HTML double-quoted parameters should be transformed to single quotes, or vice versa). The documentation of the corresponding keys as they are used in the [Windowless] section of the configuration file includes a more detailed description of each option.

This function can be disabled (e.g. for security considerations when opening pages in unknown and untrusted internet sites) by setting the NoExecute key.

Function Exists(File As String) As Boolean

Indicates whether a file exists. No warning or error messages are displayed to the user if the file does not exist, or if the medium (if an absolute path is specified) is not available. Paths used by this function are relative to the directory containing the HTML file referenced by the URL key (the first HTML document which is opened), rather than the directory containing the current HTML document, if different.

Within an HTML scripting environment, remember to use the applicable escape sequences for any special characters which may be contained in the File argument (e.g. "\" should become "\\").

Function ExpandPath(Path As String) As String

Returns the full absolute path, given a relative path or an environment variable. The resulting path is guaranteed to terminate with a backslash character. The Path string is returned unmodified if it cannot be expanded to a valid path.

Within an HTML scripting environment, remember to use the applicable escape sequences for any special characters which may be contained in the Path argument (e.g. "\" should become "\\").

Function FindDrive(Path As String, Message As String) As String

Looks for a drive containing the specified path and file (e.g. "MenuBox\MyCDIdentifier.txt"), prompting the user with a custom message (e.g. "Please insert MyCD in any drive.") to insert the medium if necessary. If the path string ends with :\" (e.g. "MyCD:\") then MenuBox looks for a volume with the specified label (name).

The function either returns the path (drive letter inclusive of trailing backslash, e.g. "D:\") of the first drive containing a matching medium, or a null string, if the medium was not found. If no Message parameter is provided, the function fails without prompt if the medium is not mounted.

For performance reasons, FindDrive does not attempt to scan floppy drives.

Function GetNV(VariableName As String) As String

Returns the value of a MenuBox nonvolatile variable. A null string is returned if the value is not set.

This function can be disabled (e.g. for security considerations when opening pages in unknown and untrusted internet sites) by setting the NoRegistry key.

Function GetRegistry(RegistryKey As String, RegistryValue As String) As String

Returns the specified registry value, or indicates whether a key exists. A null string is returned if the key or value is not found. The RegistryValue parameter is optional. If it is not provided or left empty, MenuBox returns "1" to indicate that the specificed key exists, or a null string to indicate that it was not found.

When a binary value is queried, MenuBox returns a string of space-separated hex values (e.g. "00 01 02 fc fd fe ff").

When a multi-string value is queried, MenuBox returns an array object (having a lower bound of 1). The following JavaScript example illustrates how to access such an object.

var ret = menubox_getregistry('HKEY_CURRENT_USER\\SOFTWARE\\Example', 'Test'); if (typeof(ret) == "string") { menubox_message("MenuBox Example",ret); } else { for (var i = ret.lbound(); i <= ret.ubound(); i++) menubox_message("MenuBox Example",ret.getItem(i)); }

On x64 systems the Registry Redirector isolates 32-bit and 64-bit applications by providing separate logical views of certain registry keys. In this case, MenuBox looks up first the x64 key, and then, if no x64 key was found, the corresponding x86 key. To override this behavior the RegistryKey parameter can be prefixed with "x86\" or "x64\", in which case MenuBox only searches the specified branch.

Within an HTML scripting environment, remember to use the applicable escape sequences for any special characters which may be contained in the RegistryKey argument (e.g. "\" should become "\\", as in "X86\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Publisher\\Application\\1.0").

This function can be disabled (e.g. for security considerations when opening pages in unknown and untrusted internet sites) by setting the NoRegistry key.

Sub Maximize()

Maximizes the window.

Function Message(Title As String, Message As String, Type As Long) As Long

Displays a message dialog with the desired title and message content. The "\n" escape sequence can be used to force new lines in the text.

By default, a simple system message dialog with an "OK" button is displayed. The optional Type argument can be set to change the type of dialog, using the same numeric values as in the Windows system MessageBox() function (0 = "OK", 1 = "OK" and "Cancel", 2 = "OK", "Retry" and "Ignore", 3 = "Yes", "No" and "Cancel", 4 = "Yes" and "No", 5 = "Retry" and "Cancel", etc.), which can be combined (ORed) with additional flags to set specific warning or error symbols, Help options, etc.

The return value is the same as documented for the Windows system MessageBox() function (1 = OK, 2 = Cancel, 3 = Abort, 4 = Retry, 5 = Ignore, 6 = Yes, 7 = No, 8 = Close, etc.)

If no Title string is provided, MenuBox displays the message in a small "always on top" window, suitable for example for displaying initialization progress information. This type of window has to be closed explicitly, by invoking the Message() function with an empty Message string.

»

Home | Contact Us | Request to publish your help manuals | Request to remove your help manuals