Commands Catalog
§1 Introduction
Zator has an auxiliary utility that allows store a list or catalog of executables that later can be called to execution. This catalog works in a manner similar to the known program menu of the Windows Start menu, from which you can launch applications. In Zator the catalog can contain commands to launch applications, as well as commands to be executed by the shell. For example, the command to copy the contents of a directory in another, or any other command of the many possibilities available in cmd.exe (command.com in versions of Windows 98 and earlier).
This ability is used by Zator to provide certain features of the database, but it can also be used as a mere repository of commands and/or orders for any purpose. For example, to perform backup or maintenance tasks in the system that can be invoked according with the user's needs.
§2 Maintaining the commands catalog
The maintenance begins by selecting the option Configuration >>
Commands catalog in the menu bar of the main window. As
we shall see in the corresponding section, the elements of the catalog may be
called later to execution by selecting the option Utils-1 >>
Run command
or by the button in the toolbar (Run
command).
Figure 1 |
|
|
|
Figure 2 |
The maintenance routines use the window shown in Figure 1. The default Zator installation includes some of these commands by way of example, but remember that to access the maintenance, you need Super User or System Administrator privileges. Remember also that the operations use the catalog of the work area connected at that time in the initial zone (main). As can be seen from the title line, in the example in Figure 1 is being edited the catalog of the local area.
Each item contains a title and a Command; the first serves as an identifier (aka) for the menu of invocation of the order. The command contains the address (path) of the executable you want to invocate, or the order to be transferred to the shell.
Although the maintenance process can operate on any area, the execution () always uses the catalog of the local area. This implies that the addresses contained in the Command column, will always be interpreted from the perspective of the node where is the file. You can use absolute (net-addresses) that begins with an indication of the node, or relative addresses, which begin with an indication of the volume (C:, D:, E:, etc.) Addresses that refer to objects located in other nodes must use an absolute path, while in principle, those located in the own node could use directions of any kind.
§3 Functioning
In addition to the options in the menu bar (Quit and Create new), by right clicking the mouse over the list, relies on a contextual menu with the option to modify or delete the item selected.
The above options may also be invocated with the keyboard:
- [Insert] -> Create new command
- [Del] -> Delete the item stated.
- [Alt]+[M] -> Modify the command pointed out by the cursor.
The options for the creation and modification lead to a window like in the Figure 2.
The button [Examine]
provides a browser window in which you can select any directory to find a file or
executable as value for the Command field.
§4 Modifiers of the command
As indicated above, the command can refer to an executable or an order from the system Shell. In the first case, you must indicate the direction. I.e.:
C:\Program Files\Mozilla Firefox\firefox.exe
C:\Program Files\Internet Explorer\iexplore.exe
The first command invocates the Mozilla Firefox browser (if it is installed), while the second will invoke the MS browser I. Explorer.
It is noteworthy that when the content of the command refers to an object registered by the system, it automatically uses the appropriate application to open it. For example:
D:\Doc\Manuals\telescope.pdf
D:\Doc\Manuals\comments.txt
www.zator.com
The first line will invoke the document with the Adobe viewer; the second opens the noted document whit the Windows Notepad, while the third will invoke the default browser with the home page of the Zator's site.
When the command line refers to a command from the Shell, the modifier SHELL# must precede it. For example, the line
SHELL#xcopy D:\Zator5\zDB1 \\SERVER1\D\Z\Backup
will be interpreted as a command to copy the file zDB1 in the directory D:\Z\Backup of the node Server1.
In addition to the above, there are other modifiers than can be used alone or
combined, in lines to the shell or to invocate applications:
- CONFIRM#
Calls for confirmation before executing the command. For example:
CONFIRM#SHELL#xcopy D:\Zator5\zDB1 \\SERVER1\D\Z\Backup
CONFIRM#www.zator.comThe first line asks for confirmation before making the copy, and the second before invoking the default browser.
- WAIT#
The execution of Zator remains frozen until the new application is closed or the command has completed. Example:
CONFIRM#D:\Doc\Manuals\comments.txt
This command opens the indicated document with the Windows Notepad; the control does not return to Zator (cannot do any thing with it) while the editor remains open.
Note: The SHELL# modifier includes automatically the WAIT# one, so that the control does not return to the application (Zator) until the execution of the command has been completed. - PRINT#
Send the file to the default printer of Windows. For example:
PRINT#CONFIRM#D:\Doc\Manuals\comments.txt
Send the indicated file to the printer after requesting confirmation.
- EDIT#
If is available, uses the editor to open the file. Example:
D:\Doc\WebPages\intro.htm
EDIT#D:\Doc\WebPages\intro.htmThe first command invoke the default Web browser with the page referred to, whereas the later, invoke the same page with the default HTML editor. For example, MS FrontPage if installed.
- EXPLORE#
Under normal conditions, if the subject of the action is a directory, this is opened in a window that displays its contents, but using this switch, the directory is opened with the Windows Explorer. Example:
D:\Doc\WebPages
EXPLORE#D:\Doc\WebPages
The first command displays a window with the contents of the pointed directory. The second opens the directory using Windows Explorer.
- MAILTO#
It assumes that the command is an e-mail address; the default mail client application is invokes to send and e-mail to the address indicated. For example:
CONFIRM#MAILTO#support@zator.com
Compose an e-mail to the support service of Zator Systems after requesting confirmation.
Note: in addition to the above, Zator can use others: SAVE#; DELETE# and TEMP#, which have only meaning to certain actions in the database. Its use is detailed in the corresponding section.