[Next] [Previous] [Up] [Top] [Contents] [Index]

Chapter 7 Controllers

9. Execute Script Objects


Execute script objects, like the related display callup objects, are not strictly controllers as their function is not to control channels at run-time, yet because they perform an important function at run-time they are also classified into the controllers subclass. Execute script objects are basically menus with the names of certain programs or scripts you can start simply by choosing them from a script menu at run-time. Refer to Chapter 9 if you wish to know more about the run-time behavior of execute script objects.

The property sheet of an execute script object is quite long, like that of the related display callup object, yet most of the properties are part of a simple list in which you enter in the UNIX pathname of the file that contains the script and any script arguments. You can enter in paths and arguments for up to eight scripts. There are three properties for each script you wish to include in a script menu:

1. menu label

2. script path

3. script arguments

In the second property, the 'script path' you may enter the relative or absolute UNIX pathname of the script you wish to invoke, a start-up command for another program, or a simple UNIX command like cd (change directory)--anything you can run from the command line, you can start from an execute script object. When specifying a pathname of the script, you can use any of the directory abbreviations understood by the UNIX shell, such as '~' for your home directory, '~<user>' for the home directory of another user, '.' for the current directory, and '..' for the parent directory. In addition, in the 'script path' property you can enter in any command line options or arguments in keeping with standard UNIX command line syntax. Or, you can enter any command line options or arguments in the 'script arguments' property.

In the 'script arguments' property, you can enter in any command line options or arguments for the script or the start-up command in keeping with standard UNIX syntax. Or, you can enter in a macro if the script in the 'script path' property uses any parameters. If you do specify a macro in the 'script arguments' property, be sure to place any other command line options or arguments in the 'script path' property where you entered in the pathname of the script. If you specify a program in the script path argument, rather than a simple unix command or a brief script, be sure to add an ampersand (&) after the last argument so that the program will run in the background when invoked.

The 'menu label' property specifies the name you wish to appear in the script menu when the operator brings up the script menu at run-time. You should enter in a name that is helpful and recognizable to the operator, since many script names and commands have the UNIX quality of being abbreviated and incomprehensible. If you do not enter in a name for the script in the 'menu label' property, the entry in the 'script path' property will appear in the object's menu at run-time.

Figure 7-13 shows what the 'menu label,' 'script path' and 'script arguments' properties would look like for two scripts that start up the EPICS archiver and alarm handler, two EPICS applications that are commonly run alongside DM. The 'script path' property simply has the start-up command for each application; you can see that the 'script path' does not actually need to have a pathname, but often it will. The 'script arguments' property for the alarm handler has the name of the configuration file, a standard file that you need to start up the alarm handler, while the 'script arguments' property for the archiver has a command line option (-R) in addition to an archive request file as the argument. The 'menu label' for each script or program has the name of each application.

Execute Script Properties for Alarm Handler and Archiver.

The execute script object's property sheet also has a menu title property in which you can enter in a name for the execute script object that will appear at run-time when the object is not active, i.e., when the operator is not choosing scripts from it. As with the 'menu label' properties, in the 'menu title' property you will want to enter in a title that helps the operator to recognize what the scripts in the object do, what they are related to, and their function. For instance, for the menu title of the script menu that contains EPICS applications you may want to enter in 'EPICS' or 'EPICS Applications' or 'Related Applications.' If you do not enter in a menu title, the entry in the first 'menu label' property or the current choice will appear as the title. Figure 7-14 shows an execute script object at run-time with its menu.

Execute Script (run-time appearance).

For more information on the size, position, and color properties in the execute script property sheet, see Chapter 4, Creating and Manipulating Objects.


EDD/DM User's Manual, 2.4 - 27 MARCH 1997
[Next] [Previous] [Up] [Top] [Contents] [Index]


| LANL | Lansce | UC | DOE |

L O S   A L A M O S   N A T I O N A L    L A B O R A T O R Y
Operated by the University of California for the US Department of Energy

Copyright 1996 UC   Disclaimer   


For problems or questions regarding this web site contact George Vaughn.