Re: "!" function in ARF

1999-11-23 15:28:01
Subject: Re: "!" function in ARF
From: Ray Schafer <schafer AT tkg DOT com>
To: nv-l AT lists.tivoli DOT com
Date: Tue, 23 Nov 1999 14:28:01 -0600
BAGUETTE Benoit wrote:

> I also use the xnmappmon command but I want to use the -selectList option to
> specify the args of a script ...
> and if I use f.action, the selectList is the list of objects selected on the
> map and not the args that I want to give to my script.
> So I try the "!" function in the ARF instead of f.action ... but It doesn't
> work

I didn''t think that the "!" option even existed.  Where did you find out about

>From the xnmappmon man page:

      -selectList <selection_list>
          When the -appendSelectList option is specified, the contents
          of selection_list will be appended as arguments to
          shell_command.  Entries in selection_list may be separated by
          commas, spaces, tabs, or new lines.  If any separators other
          than commas are used, selection_list must be enclosed in
          single or double quotes.  Use this option only when executing
          xnmappmon from the shell command line; when xnmappmon is
          executed from within the TME 10 NetView graphical interface,
          the selection list consists of those items selected on

In other words: you can't specify arguments using selectList if you run it from
the GUI.  However you can specify the command arguments on the command
itself!   For example:
If I define action foobar as:
    Action foobar     {
        MinSelected  1;
        Command "/usr/OV/bin/xnmappmon  \
                 -commandTitle \"Test foo\" \
                 -geometry 600x400                    \
                 -selectList one,two,three -appendSelectList -singleDialog \
                 -cmd /tmp/testfoo" ;

It won't append "one,two,three" to the command line.  It will fire off the
command /tmp/testfoo with the nodes selected in the GUI as arguments.  However
if I define foobar as this:
    Action foobar     {
        MinSelected  1;
        Command "/usr/OV/bin/xnmappmon  \
                 -commandTitle \"Test foo\" \
                 -geometry 600x400                    \
                 -appendSelectList -singleDialog \
                 -cmd /tmp/testfoo one two three" ;

The command is executed with arguments "one two three" and then the list of
nodes selected in the GUI.

Does that help?  Is that what you want to do?

Another possibility is to create a shell script that prompts you for an
arument, and then fires off a command with the arguments you want.   You can
then use the -e option of xterm or aixterm to fire off the script in a window.

> Benoit.
> -----Message d'origine-----
> De: Ray Schafer [mailto:schafer AT TKG DOT COM]
> Date: vendredi 19 novembre 1999 23:21
> À: NV-L AT UCSBVM.ucsb DOT edu
> Objet: Re: "!" function in ARF
> BAGUETTE Benoit wrote:
> > Hi,
> >
> > Does anybody can send me an example of ARF with a "!" function to
> integrate
> > shell commands into menu selections?
> > I always have the error message "The action associated to this item could
> > not be started"
> >
> > Thanks
> I use xnmappmon for that.  There are other registration files that call
> this,
> and you can use them as examples.
> --
> Ray Schafer                   | schafer AT tkg DOT com
> The Kernel Group              | Distributed Systems Management
> http://www.tkg.com

Ray Schafer                   | schafer AT tkg DOT com
The Kernel Group              | Distributed Systems Management

<Prev in Thread] Current Thread [Next in Thread>