Toolbars are used to launch macros, files, and to execute any other commands. Toolbar syntax is the same as of pop-up menu, except that toolbars cannot have submenus.


A toolbar can be free or attached to a window. If a toolbar is attached to a window, that window becomes owner of the toolbar. The toolbar always is on top of that window. It is hidden when the window is minimized or hidden. It is destroyed when the window is destroyed. It follows the window (optionally) when the window is moved or resized. A toolbar can have multiple instances attached to multiple windows. A window can have several different attached toolbars.


A toolbar can be attached to a window using two ways:


1. Assign a window trigger.


2. Launch the toolbar using mac with window handle as command. Example: mac "Toolbar9" win("Calc")


If toolbar is launched using some other way, it isn't attached to a window. Such toolbar is always on top.


Macro launched from a toolbar receives toolbar window handle in the _command variable. Use val(_command) to get it.


When you use mac, it returns toolbar window handle (even if the toolbar was already running).



Move toolbar: drag with the mouse right button.

Move or delete a button: Shift+drag.

Add a button to run macro, file or open Internet link: drag and drop. Ctrl can be used for shortcuts.

If you drag and drop a file onto a program icon, you can choose to open the file in that program.

Right click toolbar to view context menu.

Don't show text of some buttons: insert tab at the beginning of line. You still will see tooltips.


See also: Quick Start, toolbar right-click menu toolbar properties extended toolbars DynamicToolbar GetToolbarOwner