nv-l
[Top] [All Lists]

Re: "!" function in ARF

To: nv-l@lists.tivoli.com
Subject: Re: "!" function in ARF
From: BAGUETTE Benoit <benoit.baguette@WIN.BE>
Date: Wed, 24 Nov 1999 08:30:18 +0100
Thanks for your response Ray.

The second example you give is the solution that I use for now but it's a
bit "dirty" (to give useless arguments to a script).
I know the right solution is to write my own application (with my own dialog
box) but I don't have time to do it now.
I found the "!" function in the "programmer's guide version 5 on page 3-4"
... but It doesn't work

Benoit.


-----Message d'origine-----
De: Ray Schafer [mailto:schafer@TKG.COM]
Date: mardi 23 novembre 1999 21:28
À: NV-L@UCSBVM.ucsb.edu
Objet: Re: "!" function in ARF


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
it?


>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
          submaps.

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@TKG.COM]
> Date: vendredi 19 novembre 1999 23:21
> À: NV-L@UCSBVM.ucsb.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@tkg.com
> The Kernel Group              | Distributed Systems Management
> http://www.tkg.com

--
Ray Schafer                   | schafer@tkg.com
The Kernel Group              | Distributed Systems Management
http://www.tkg.com


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

Archive operated by Skills 1st Ltd

See also: The NetView Web