Creates a new button on a toolbar. You can change the format of your toolbar by adding line separators, line breaks, etc. using the CreateToolbarControl command.
CreateToolbarButton( Toolbar, Command, [Index] ); |
Parameter | Type | Description |
---|---|---|
Toolbar | String | Unique identifier of the toolbar to which the button is added. |
Command | String | Unique identifier of the command linked to the new button. You can determine the unique identifier for a command by calling Command.UID. |
Index | Integer | Position of the button on the toolbar (0 is the first button, 1
is the second button, and so on; -1 is the last button).
Default Value: -1 (add to end) |
sub Install() dim file, toolbar, command, path path = Application.InstallationPath( siUserPath ) file = path & "\Data\Scripts\myUtils.vbs" 'Create Toolbar toolbar = CreateToolbar("Utilities") 'Create Commands command = CreateScriptCommand( "Simplify It" ,_ "makeSimple" ,_ file ,_ "MakeSimple",_ "Makes life easier." ) 'Add button to toolbar. CreateToolbarButton toolbar, command end sub |