## TrayLauncher documentation

### Li Chao

2010-11-25

## 1. Introduction

TrayLauncher (Tray Launcher) is a file launcher that stays in the system tray.

It helps you to access your files and/or programs much faster.

OS: Win Xp/Vista/7

TrayLauncher is open-source.

Website: http://code.google.com/p/traylauncher

E-mail : `<traylauncher@gmail.com>`

## 2. Features

Easy to use;

Small size;

Resource friendly;

Powerful "Run" dialog box;

Icon preview; Skinable;

Keyboard support;

Unlimited numbers of menu items;

Support wild card and relative paths;

Support multilingual user interface;

Optional start with system;

## 3. Install & Un install

| Important
Upgrade tip: Do NOT overwrite your own command file or setting file.

To Install and use, just unzip the files to an empty folder and run `traylauncher.exe`.

To Un install, disable autostart (un check the Start With Windows on the context menu), and delete the folder.

## 4. Usage

### 4.1. Mouse control

Left click on the tray icon to launch normal menu, or right click to launch program context menu.

TrayLauncher does nothing when you drag the tray icon.

### 4.2. Keyboard control

You can also use System-Wide hot key : Alt+win key, Shift+win key and Ctrl+win key.

| Tip
You can customize the hot keys in the setting file.

Note that the left and the right Win keys have different meanings :

1. Alt+left win is like left click on the tray icon, while Alt+right win is like right click on the tray icon. The only difference is that when you use System-Wide hot keys, the menu will be displayed at the left up corner of your screen instead of at the position of your mouse pointer.

2. Shift+left win is like Alt+left win, but the menu will be displayed at the point of your mouse cursor.

3. Ctrl+left win will display the Execute or Run dialog, press again, it will disappear.

| Note
If the hot keys are already used by another program, TrayLauncher will display a message, and you will not be able to use the hot key(s) with TrayLauncher.

Actually, you can control TrayLauncher without using your mouse at all. You can use the arrow key to select a menu item, press enter to execute it. For fast access, you can use a letter key. The first letter of the name of the menu item is used as the index key, the index letter is not case sensitive, so a is equal to A.

For example : if you have the following 3 menu items:

- Opera

- Firefox

- Flashget

when you press the key o, Opera will be launched. (You should have given the correct path for it.)

And when you press the key F, since there are two items begin with F, first Firefox will be selected, and you press F key again, Flashget will be selected, F key again and Firefox is again selected. Press Enter to execute.

| Note
You can set the index letter instead of using the default first letter. See below.

### 4.3. Auto run

Use the Start With Windows option on the context menu. Check this, and TrayLauncher will start automatically when you start your computer.

## 5. The file format

| Note
Since V2.0, there is a GUI menu editor, so you don't need to know all the details to edit the command. You can skip this section if you just use the common features. But it would be useful if you use some of the advanced features such as wild card mode.

Maybe the most difficult part is to understand the command file format. TrayLauncher use a command file to store the menu items or commands. You need to edit the file (it's a text file) to add your own items. Menu items look much better on the menu than in the command file.

You can launch context menu, and use Edit Commands to open and edit `TLCmd.txt`, and after you save the change(s), the menu will be updated the next time you open it, or you can use Refresh to update the menu yourself, no need to restart TrayLauncher.

| Note
This command file (`TLCmd.txt` by default) is a normal text file, and it must be saved in Unicode (little endian).

### 5.1. Comments:

Texts after ";" until the end of the line are comments , and will be ignored by TrayLauncher. Otherwise, they present a command or menu item.

| Caution
If you use the GUI command editor to edit and save the menu, all comments will be lost.

### 5.2. Menu item

A command or menu item contains two parts :

1. the text before "=" , the name of the item. This is the text shown on the menu item.

2. the text after "=" until the end of the line, that is the filename or command line, or the command of the item.. TrayLauncher will execute the command when you click the menu item.

For example, add the following two lines to `TLCmd.txt`:

Example 1. menu item

notepad = C:\windows\notepad.exe
notepadToo = "C:\windows\notepad.exe" a.txt ;try to open a.txt,
; Since v1.9, file icon is customizable, just add ||| your icon path at the end.
notepadToo = "C:\windows\notepad.exe" a.txt ||| myicon.ico ;same as above, but use another icon.

| Tip
The " " is optional for normal file target. You use them to quote the executable file when it needs parameters.

### 5.3. Sub menu

Adding a sub menu is much the same as adding a normal menu item. Just add an extra ">" at the beginning of the line. The lines that followed will all be added to the sub menu, until they meet a line that begin with "<" which means end of sub menu.

The following example Created a sub menu that have 3 items:

Example 2. sub menu

> SubmenuName = "you use this path to set the icon of the sub menu"
item1 = notepad.exe
item2 = "notepad.exe" a.txt
item3 = notepad.exe
< ; end of sub menu

### 5.4. Setting index letter

Just add a "&" before the letter which you want to set as the index letter:

Example 3. index letter

notepad&Three = "C:\windows\notepad.exe"

The letter "T" will be underlined on the menu, to indicate that it's the index letter.

| Tip
If you want to write the letter "&" itself, use "&&" instead.

### 5.5. Using the '*'

you can add multiple items at once with "*"; there are now 4 types of usage: *.*, * , ** and *+*. Here are some examples:

Example 4. wild card mode

*.exe = c:\windows\*.* ;add every .exe file in C:\windows\ .
a*=c:\windows\* ;add every file and folder that begins with "a" in c:\windows\ .
*.exe = c:\windows\** ;add every .exe file in c:\windows\ or its sub folders or its sub folders' sub folders...
*.exe = c:\windows\*+* ;add every .exe file in c:\windows\ or its sub folders or its sub folders' sub folders...
;Since v1.8.7, you can use multiple wild cards separated by "|" :
*.exe|*.com = c:\windows\*.* ;add every .exe and .com file in c:\windows\ .
;Since v1.9, you can explore all your files with a single line :
= \\** ; A special mode to explore My Computer.

The difference between ** and *+* mode :

- when you use *+* mode, the menu is built at once and no more (if you don't Refresh),

- and when you use **, the sub menus are built each time you explore them.

| Important
Use the *+* mode carefully, it may take minutes to build the menu when there are too many files. The ** mode is recommended for large number of items. The *+* mode is better for small number of items as the items will be indexed when you use the run dialog. Do NOT use any spaces beside "|" when using multiple wild cards, they count.

### 5.6. Title

Title is just some text displayed on the menu. To add a Title, you just need to write the text, and that's it. For example, add the following line to the command file:

Example 5. title

This will be displayed as title!

You will see the text on the menu, but it will be grayed, and nothing will happen when you click on it.

You can use titles to display some instructions.

### 5.7. The relative paths

A single dot, "." means the current directory, that is the one where you put TrayLauncher.exe, while ".." means the parent directory of the current directory.

### 5.8. Separator and empty line

An empty line means a separator. So, don't use that if you don't need any separator.

To make your file more readable, you can use a line that contains only a ";", and the hole line will be treated as a comment and TrayLauncher will simply ignore it.

## 6. The run dialog

Just press Ctrl+left win to launch the run dialog.

As you type, TrayLauncher will automatically search the menu items and your system for executable or files that match your input.

After you enter a command and run it, the run dialog will automatically disappear if there is no error.

It remembers the latest 50 correct commands and your last input. To clear the history list, enter `-clear` or `:clear` in the edit box and run it.

| Note
Since v1.8.6 the run dialog can also be launched from the context menu.

## 7. Multilingual

Since V1.8, you could use the `TL.ini` setting file to specify the language file.

A language file is just another UNICODE text file, you can edit it if you like.

| Tip
Since v1.8.5, you can choose language in the context menu. No need to edit the setting file manually.

## 8. Skins

Since V1.8 TrayLauncher supports skins.

A skin is just a set of bitmap files in a folder inside the `skin` folder; you can create your own skin as you wish.

Since V1.9.6 some menu icons can also be customized together in a skin.

Put the icons in the "icons" folder within a skin folder, and when the skin is selected, the icons within it are used automatically.

The icons should be named as follow:

about.ico
autostart.ico
close.ico
edit.ico
exit.ico
language.ico
mclick.ico
open.ico
refresh.ico
run.ico
skin.ico
unknown.ico

| Tip
You can put a small (82X110 or smaller) bitmap file `TLlogo.bmp` along with `TrayLauncher.exe, it will be displayed in the about dialog.`

## 9. Setting file

Since V1.8 Traylauncher has got a setting file, you can edit this file to set a few settings; more settings may be added later.

The setting file is divided into sections, and each section has some key-value pairs.

A key is a setting option, while a value is the what you set for that option. Here are some of the keys and their values in general section:

Table 1. general settings

key | description | available values
--- | --- | ---
command | specify a command file | should be a valid path to a text file.
confirm_exit | option to show the confirm dialog when exit traylauncher | 1 (show) or 0 ( not show).
language | set the language file to use | a valid language file name.
midclick | use the mid mouse button to show menu or not. | 1 (use) or 0 (not use).
runicon | use a custom icon for run dialog. | (valid path to an icon.)
trayicon | use a custom icon for the system tray. | (valid path to an icon.)
priority | set priority of traylauncher. | high, above_normal, normal, below_normal, idle
skin | set the skin | (skin name, or folder name of a skin)
showhidden | show hidden files for wild card mode. | 1 (show) or 0 (not show)

The history section is maintained by traylauncher automatically, it's the history command you typed in the run dialog.

The hotkey section is used to change hot keys. Available values are like these: Alt+A, Ctrl+Alt+LWin, Win+Q, Shift+LWin, etc.

| Note
These are system wide hot keys, if another program has already used it, traylauncher would not be able to use that setting.

Here is a sample setting file:

Example 6. setting file

[general]
command = .\TLCmd.txt
confirm_exit = 0
language = TL_cn.lng
midclick = 0
runicon = .\TLRun.ico
priority = above_normal
showhidden = 0
skin = Office
trayicon = .\TLTray.ico
[history]
01 = Avant
02 = Code Blocks
[hotkey]
ShowMenuAtMouse = Shift + LWin
RunDialog = Ctrl + LWin
ShowContextMenu = Alt + RWin
ShowContextMenu_alt = Ctrl + Alt + LWin
ShowMenu = Alt + LWin