Tools+and+Utilities

Supplied Add-in Utilities
These utilities are automatically installed with //BBC BASIC for Windows//; they should appear in the **Utilities menu**.

Utilities Manager
(authors Malcolm Marten and Richard Russell)

This is a little program that expands the Utility menu system to cope with more than nine add-in utilities, and allows it to be configured by any BB4W user. It has two parts: a list of 'extra' utilities or other runable programs, and a manager to add, move or remove utilities.

The first part consists of a list of 'extra' utilities, runable programs or files that have associated applications. The relevant program or utility is run by double-clicking on its entry, or by selecting it and clicking on 'Run'. In the case of runable programs this does little more than the Windows start menu, but it does let you select a subset of programs that are useful while in the BB4W IDE. BB4W 'add-in' utilities in the list can be passed the command line parameters necessary to link to the IDE, so the number of such utilities is no longer limited to nine.

The second part is a 'Slot' manager. It allows a utility (either of the 'add-in' variety or a runable program) to be added, moved to a different slot or removed. It allows you to remove any badly behaved utility or reinstall it from an alternative location. It also allows you to move a utility between the set of nine that are immediately accessible from the Utilities menu and the list of 'extra' utilities.

Add Windows Constants
(author Richard Russell)

This utility scans the program currently loaded in the IDE and automatically adds declarations for any undefined Windows Constants found. It will recognise string constants only if the user puts a $ character after the name (e.g. HOTKEY_CLASS$ is recognised but not HOTKEY_CLASS) and any Windows Constant that starts with a BB4W keyword **must** have an underscore at the beginning (e.g. _ERROR_BAD_FORMAT not ERROR_BAD_FORMAT); otherwise a leading underscore is optional. In the case of an integer numeric constant a trailing % is optional, so for example WM_PAINT, _WM_PAINT, WM_PAINT% and _WM_PAINT% are all recognised.

Constants will be added to the beginning of the program unless a REM!WC directive is detected, in which case, constants will be added to the line following REM!WC.

There is a Conforums thread dedicated to the reporting of any missing constants or bugs. []

Cross Reference
(author Richard Russell)

This utility generates a Tree View (and optionally an output file) listing the variables, functions and procedures used by the current program. It also produces warnings when certain, possibly suspect, code features are detected (for example variables which are apparently unused).

Differences
(author Richard Russell)

This utility compares the program currently loaded in the IDE with another program specified by the user (typically an earlier version) and reports the differences.

Macro Recorder
(author Richard Russell)

This utility records a series of keystrokes to one of the BB4W keyboard macros, so they may be 'played back' as required by pressing the appropriate key: Shift+F1 to Shift+F9, F10 to F15 (without shift) or Tab.

Memory Monitor
(author Richard Russell)

This utility provides exactly the same functionality as the PROCmonitor routine, but without the inconvenience of having to incorporate the code into your own program. It can also be used when there would have been insufficient memory to incorporate **PROCmonitor** (for example when using the trial version of BB4W).

Version 2.0 optionally displays the **contents** of a specified block of memory, as well as memory usage.

Module Viewer
(author Richard Russell)

This utility adds the ability to view INSTALLed modules and libraries without having to open a separate IDE window. If an error occurs in an INSTALLed module, the relevant line is automatically highlighted. You can also Trace and Single Step through INSTALLed and CALLed modules.

In Version 3.0 **double-clicking** on one of the tabs opens the module for editing in a new IDE.

Profiler
(authors Michael Hutton and Richard Russell)

This utility expands on the functionality of the PROFILER.BBC tool supplied with //BBC BASIC for Windows//. The main enhancement is that profiling will automatically stop, and display the report, when:
 * 1) A specified timeout has been reached.
 * 2) An END or QUIT statement has been encountered.
 * 3) Immediate mode is detected.
 * 4) The user clicks on the close button in the window, or presses Alt-F4.

Version Info
(author Richard Russell)

This utility makes it easy to add a [|VERSIONINFO] resource to a 'compiled' BB4W executable; it requires version 5.92a or later. The utility creates, or (if it already exists) edits, a file in the same directory as your BASIC program but with the extension **.res** (a standard file format for containing resources); if it contains other resources they will be unaffected. It also automatically adds a **REM!Resource** compiler directive to your BASIC program to cause the resource(s) to be added to the executable.

Additional Add-in Utilities
These utilities are not supplied with //BBC BASIC for Windows// but may be downloaded to a suitable place on your PC and then added to the Utilities menu using the **Utilities Manager** (typically as one of the 'extra' utilities).

Search BASIC Programs
(author Richard Russell) Download [|here] . This utility allows you to search BASIC program files (both tokenised **.BBC** files and plain-text **.BAS** files) to see if they contain a specified text string. For example, you could find all the BASIC programs which contain a reference to the PROC_movesprite library routine.

List Variables Alternative
(author Malcolm Marten) Download [|here].

A simple utility that cosmetically extends the List Variables utility. The utility does three things:
 * 1) It makes the List Variables window non-topmost. It will disappear behind other windows.
 * 2) It remembers its previous size and position.
 * 3) It tells you what program it is listing variables for.

The utility launches the List Variables window and repositions it with the values it finds in an INI file; this should be the size and position it had when you last used the utility. If you don't have an INI file, as is the case when you first use it, then it writes a default one and positions the List Variables window on the right hand edge of the screen. This INI file is located in a subdirectory of the User's AppData folder. If you want to keep your List Variables window Topmost then manually change the Z-order string to HWND_TOPMOST in the INI file.

The List Variables title includes the name of the current program, so My_Program would spawn a List Variables window titled "Vars in My_Program". The prefix is 'Vars in' by default but can be customised by writing to the INI file. This way you can have more than one List Variables window open and easily find the one you want.