Command Bar

Detailed informations about Command Bar and Buttons.

Summary

Command Bars are toolbars that can have multiple Command Buttons, which provide quick access to functions performed to the Folder Views and Window, etc.
It's totally customizable and you can make buttons choosing commands from hundreds of built-in commands.

Command Bars are offered as 3 toolbars — 2 horizontal bars and 1 vertical bar.

To activate Command Bars

(Windows 7) View - Toolbars/Explorer Bar in the Menu Bar. (figure. 1)
(Windows 8 and 10) Drop-down menu of "Options" button in the Ribbon. (figure. 2)

You can do it also from context menu of other QTTabBar toolbars, Folder Band in Windows 7, and keyboard shortcuts.

To add a new Command Button to Command Bar

  • Drag buttons from Option Window and drop on to Command Bar
  • Select an item under the "Create New..." in the context menu of Command Bar background
  • Drag and drop QTTabBarCommand file to the bar
  • Drag and drop files or folders to the bar

Command Bar Options

Options of Command Bar are available through context menu.
Text label Specifies whether text labels are displayed before or under icon.
Icon size Changes icon size of buttons.
Possible sizes are : 16, 24, 32, 48 - 256px.
Ctrl + Wheeling over the toolbar also changes icon size, if "Lock items" is not checked.
Lock items Prohibits items from moved by drag & drop or mouse wheeling. Also prohibits icon size changing by Ctrl + mouse wheel.
Allow to start to drag items Command Buttons can be dragged and dropped to other toolbars or windows.
If disabled, items are fixed and you cannot start drag to move it.
Allow to drop to sibling items Command Buttons can be dragged and dropped to other sibling command items in Command Bar to add target's Child Items.

Command Item

Command Item is an unit of command execution.
There are the following types of Command Item.

Classifications

Basic command Built-in basic commands. "Go back", "Go forward", "Close the active tab", etc.
Advanced command You can create new buttons of more than 100 commands that cover almost all of the QTTabBar functionalities.
Some commands take arguments and return results, which allows to build complex commands in combination.
File & Folder Works as shortcut. Folder can expand its contents to drop-down menu.
Group Opens registered tab groups. A button can have multiple groups as members.
Plug-In Buttons added by plug-ins. Performs functionalities that plug-ins provide.

Common options of Command Item

To edit detailed options of a Command Button, select "Edit" in context menu of the button, or middle-clicking on the button (by default).

Common options

Label Name of command, displayed in the button and menu.
Type of command Specifies what kind of command to be executed. See classification.
Type of button Specifies what kind of button is added to Command Bars. (This option is not available to Basic commands.)
Child Items are displayed in drop-down menu.
Button A button to execute a command.
Drop-down button A button to display menu to choose commands to be executed. The button itself cannot execute its command by click.
Split button A combination of a standard button on the left and a drop-down button on the right.
Icon path Path string that specifies image or icon file used as an icon resource of the button.
The file can be .dll or .exe. For example, "%SystemRoot%\system32\SHELL32.dll", 3 as folder icon.
"FILE_PATH", resource-index (A comma followed by a space required.)
Keyboard shortcut Keyboard shortcut to execute the command.
Display text Specifies whether text label is displayed or not when the command is added to the Command Bars.
Display icon Specifies whether icon is displayed or not when the command is added to the Command Bars. Text label will be displayed if icon is disabled.
Fix to the left/top corner Locks the button in the left/top corner of the Command Bar and prevents moving by drag & drop or mouse wheeling.
Associated view
Specifies in which View the commmand is executed. Some commands ignore this value.
Not specified Uses View that has keyboard focus, if any. Default View otherwise.
Default Defaut View.
Extra View (bottom) Extra View (bottom) if exists. If the command opens new tabs, this may activate the Extra View at the bottom.
Extra View (left) Extra View (left) if exists. If the command opens new tabs, this may activate the Extra View on the left.

Child Items

Command Items can have any plural number of child of Command Items.
To add a new child item, select "Child Items" tab in editor window.

Child items are accessible in drop-down menu of their parent item.
To display child items in drop-down menu, the button type of the command need to be "Drop-down button" or "Split button".

"Child Items" tab of editor window

Basic command

The following are default images of basic commands.

Basic Commands are skinnable. See Option Window.

Advanced command

For available Command ID values, see Scripting Commands.
Advanced commands can take 8 arguments and accepts Keywords.

Keywords

The following keywords in arguments and working directory are replaced automatically by QTTabBar before the command is executed.
Some of these are also used in Application Launcher.
Those keywords which use Folder View are affected by the Associated View value of the command.

Keyword Implies... Description
%f% file Replaced with full paths of selected files in the folder view. Double-quoted. Space-separated if multiple.
%d% directory Replaced with full paths of selected folders in the folder view. Double-quoted. Space-separated if multiple.
%s% selection Replaced with full paths of selected files and folders in the folder view. Double-quoted. Space-separated if multiple.
%c% current Replaced with current folder path. Double-quoted if contains spaces.
%cd% current or directory Replaced with full path string of a selected folder if a folder is selected, or current folder path otherwise. Double-quoted if contains spaces.
%n% name Replaced with name of a single selected file or folder.

Use the following if you don't want quotation marks. Useful when you want to concatenate them.
Keyword Description
%F% Replaced with full paths of selected files in the folder view. Double-quoted and Space-separated if multiple. No quotation marks if a single file.
%D% Replaced with full paths of selected folders in the folder view. Double-quoted and Space-separated if multiple. No quotation marks if a single folder.
%S% Replaced with full paths of selected files and folders in the folder view. Double-quoted and Space-separated if multiple. No quotation marks if a single file/folder.
%C% Replaced with current folder path. Not quoted even if contains spaces.
%CD% Replaced with full path string of a selected folder if a folder is selected, or current folder path otherwise. Not quoted even if contains spaces.

The following keywords are replaced with return value of other Command Items that are executed before the command itself is executed.
Some Advanced Commands can return value. See Returning value.
Keyword Description
%#1%, %#2%, %#3% ... Replaced with return value of the 1st, 2nd, 3rd Child Item and so on.
%&1%, %&2%, %&3% ... Replaced with return value of the 1st, 2nd, 3rd sibling item and so on.
Number is 1-based index of Child Items that share the same parent.

These are replaced with data in the Data Slot. SetData command is used to set data to slot.
Keyword Description
%$1%, %$2%, %$3% ... Replaced with the data in the Data Slot1, Data Slot2, Data Slot3, and so on.

These are used with events. For more information, see Binding to events.
Keyword Description
%eventdata_str% Replaced with a text expression of event data.
%eventdata_key% Replaced with unique key value of an event to get raw event data. This can be passed to script files and used to get event object with Scripting.GetEventData() method.

File & Folder

File & Folder item works as shortcut with detailed options to execute file and open folder.

Path Specifies full path to file or folder, arguments, and working directory.
Arguments and working directory are optional and accept Keywords mentioned above.
Arguments
Working Directory
Verb Executes a file or a folder in Path with specified Verb.
Verbs are commands that you see in file context menu, such as "open", "print", "edit", or "play".
This option is enabled only when Action is set to "Execute by Shell".
Note that you need to specify not the localized text but the verb name used as registry key name under "shell" keys. (ex HKEY_CLASSES_ROOT\Folder\shell)
Action Controls how file or folder is executed or opened.
"Default", "New tab", "New tab in Background", "In-place", "New window" control how a folder is opened.
"Execute by Shell" uses Verb option value to execute file and folder.

Options in Details tab

Network timeout Specifies time, in milliseconds, for which QTTabBar waits until network path is found.
For example, larger value would be required in order to wait for NAS that might be in sleep mode to wake up and spin up its HDDs.
Note that this affects a time required for opening a folder window.
Skip network address resolution Check if you do not want to wait. Network folder path might not be resolved and you might have to retry manually to execute this item or show subfolder menu, because QTTabBar returns control immediately before such a NAS wakes up.
Allow file drop to this item Allows file copy or move to this item if this is folder.
Allows execution with dropped files if the item is executable.
Expand files in this folder instead of Child Items When the item points to a folder and Type of button has drop-down menu,
items in the folder are expanded to drop-down menu.
Child Items of this command item are expanded to drop-down menu if this option is disabled.
Window size Specifies window size of launching application.
Some applications ignore this option.

Group

Group command item can have multiple Tab Groups as members.

Group name Multiple groups can be added. Select and press Add button.
They open in the order when executed.
Action "Default", "Background", "New window", or "Replace".
Background -> opens without activating
Replace -> closes other existing tabs on opening groups
Expand group members instead of Child Items When Type of button option has drop-down menu,
member folders of groups are expanded to drop-down menu.
Child Items of this command item are expanded to drop-down menu if this option is disabled.

Plug-in

Plug-ins can provide Command Buttons of its own functionalities.

For more details, see Plug-in.
Offical plug-ins can be download here.

Command file

Command Items can be exported to / imported from QTTabBarCommand file format.

"Export" command in context-menu of a button creates a complete snap shot including its Child Items.
You can restore the item by dropping a QTTabBarCommand file to Command Bars.

Binding to events

Some Events can be bound to a Command Item.

Returning value

Some of Advanced Commands return values.
File Command can return value when its Path is a script file and it sets a return value by Scripting.SetReturnValue method.
(SetReturnValue method is implemented in 1026.)

Using keywords explained above, Commands can use return values of other Command as arguments.

figure. 1 - From menu bar...
figure. 2 - "Options" button in the Ribbon.
figure. 3 - Editor window of command
(basic command).
figure. 4 - Editor window of command
(advanced command).
figure. 5 - Editor window of command
(file & folder).