Subject: Variable Arguments to AddToFunc

From: [email-masked]
Date: Wed, 13 Oct 1999 20:05:22 -0500 (CDT)

Full_Name: Neil Zanella
Version: 2.3.9
CVS_Date: 
OS: Linux 2.3.9
X_Server: XFree86 3.3.2
Submission from: (NULL) (129.128.88.47)

Hello,

It would be *REALLY* nice if it were possible to pass arguments to

AddToFunc from within a .fvwm2rc script.

Thanks,

Neil

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 14 Oct 1999 05:01:25 +0200

> AddToFunc from within a .fvwm2rc script.

What do you have in mind?  Something like this?

  AddToFunc $0
  + I ...

Nothing prevents you from writing a complex function that calls
AddToFunc:

  AddToFunc MyAddToFunc
  + I AddToFunc $0 $1 $2 $3 $4 $5 $6 $7 $8 $9

Is this what you mean?

Bye

Dominik ^_^

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Neil Zanella <[email-masked]>
Date: Thu, 14 Oct 1999 00:40:50 -0230 (NDT)

> What do you have in mind?  Something like this?

Precisely.

Just to get me started with a simple example, how do I run a function that 
passes an IP address to ftp and runs it within an xterm?

>   + I AddToFunc $0 $1 $2 $3 $4 $5 $6 $7 $8 $9

Yes, this is what I want, but is the $0 $1 $2 ... $argv , etc...
functionality already built in AddToFunc?
If it were then Fvwm2 would be many orders of magnitude more powerful
than I thought it was!

Neil

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 14 Oct 1999 05:46:46 +0200

> passes an IP address to ftp and runs it within an xterm?

Open ConfigFvwmSetup, search for FuncFvwmRloginXterm and similar.
There are many examples for such functions in the fvwm manpage too.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 14 Oct 1999 05:40:12 +0200

> passes an IP address to ftp and runs it within an xterm?

  AddTuFunc my_ftp_func
  + I xterm -e ftp $0

The call it with 

  my_ftp_func 192.168.1.2

> If it were then Fvwm2 would be many orders of magnitude more powerful

It's not built into AddToFunc but into all complex functions in
fvwm.  These are defined with the 'AddToFunc' command.  Whenever
you call a function defined in this way you can pass up to ten
command line arguments.  Whereever a $0...$9 appears in the commands
of the function it is replaced with the corresponding argument.
You can find a few examples in the man page.

Bye

Dominik ^_^

---

From: Neil Zanella <[email-masked]>
Date: Thu, 14 Oct 1999 04:41:05 -0230 (NDT)

> Open ConfigFvwmSetup, search for FuncFvwmRloginXterm and similar.

Where do I find these?

> There are many examples for such functions in the fvwm manpage too.

Are these features new in Fvwm 2.3?

I remember asking whether it was possible to embed scripts in fvwm and
someone replied saying it was not possible. It is starting to seem to me 
that it is possible.

Thanks,

Neil

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 14 Oct 1999 09:23:08 +0200

> > Open ConfigFvwmSetup, search for FuncFvwmRloginXterm and similar.

I'm not sure where these get installed, but you can find it in
the source tree:

  fvwm/ConfigFvwmSetup

> Are these features new in Fvwm 2.3?

No.

> someone replied saying it was not possible. It is starting to seem to me 

You were asking about *shell scripts* back then.  The reason why we don't
want to support this is that the functionality is already there.  For
example you can let fvwm parse the output of a shell command with the
'PipeRead' command:

  Piperead shell_command

Bye

Dominik ^_^