Re: Periodic command

2006-07-05 Thread Dominik Vogt
On Tue, Jul 04, 2006 at 06:44:32PM +1000, Scott Smedley wrote:
 Hi all,
 
 Here is a proposed patch to add a new builtin function, Periodic.
 
 http://members.optusnet.com.au/scottsmedley/fvwm/periodic.patch
 
 Apply with: patch -p0  periodic.patch
 
 It is similar to the Schedule builtin except the function is invoked
 every N milliseconds - even if a grab fails, or the function fails
 to execute for some other reason.
 
 It will allow the user to do something like:
 
 Periodic 1000 Echo Testing the Periodic builtin.
 Deschedule $[schedule.last]
 Periodic 1000 42 Echo Testing Periodic with explicit command Id.
 Deschedule 42

Can you have multiple peridic commands or just one?  If you can
have multiple (which I think is a good thing), I suggest to
replace the command Periodic with some option to the Schedule
command (in order to reduce the number of commands we have to
maintain and describe).

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: Periodic command

2006-07-05 Thread Scott Smedley
Hi Dominik,

 Can you have multiple peridic commands or just one?

Multiple.

 I suggest to replace the command Periodic with some option to the Schedule
 command

The current specification for Schedule is:

Schedule delay_ms [command_id] command

So, would something like the following do?

Schedule delay_ms [command_id] [Periodic] command

Perhaps someone has a better suggestion?

SCoTT. :)



Re: Periodic command

2006-07-05 Thread Viktor Griph

On Wed, 5 Jul 2006, Scott Smedley wrote:


Hi Dominik,


Can you have multiple peridic commands or just one?


Multiple.


I suggest to replace the command Periodic with some option to the Schedule
command


The current specification for Schedule is:

Schedule delay_ms [command_id] command

So, would something like the following do?

Schedule delay_ms [command_id] [Periodic] command

Perhaps someone has a better suggestion?



I think the above is good. The only problem with it is that if someone has 
a function named Periodic and use to execute that with Schedulte the above 
will break that config. One way to avoid that, and also give room for more 
possible options to Schedule in the future, is to put options before the 
delay. That way any string before the delay number could be read as an 
option. So


Schedule [Periodic] delay_ms [command_id] command

would be a possible easier to parse syntax.

/Viktor



Re: Periodic command

2006-07-05 Thread Dan Espen
Viktor Griph [EMAIL PROTECTED] writes:
 On Wed, 5 Jul 2006, Scott Smedley wrote:
 
  Hi Dominik,
 
  Can you have multiple peridic commands or just one?
 
  Multiple.
 
  I suggest to replace the command Periodic with some option to the Schedu
 le
  command
 
  The current specification for Schedule is:
 
  Schedule delay_ms [command_id] command
 
  So, would something like the following do?
 
  Schedule delay_ms [command_id] [Periodic] command
 
  Perhaps someone has a better suggestion?
 
 
 I think the above is good. The only problem with it is that if someone has 
 a function named Periodic and use to execute that with Schedulte the above 
 will break that config. One way to avoid that, and also give room for more 
 possible options to Schedule in the future, is to put options before the 
 delay. That way any string before the delay number could be read as an 
 option. So
 
 Schedule [Periodic] delay_ms [command_id] command
 
 would be a possible easier to parse syntax.

How about:

Schedule delay_ms x repeat_ms [command_id] command

Ie:

Schedule 1000 x 2000 
Schedule x 5000 

-- 
Dan Espen   E-mail: [EMAIL PROTECTED]



Periodic command

2006-07-04 Thread Scott Smedley
Hi all,

Here is a proposed patch to add a new builtin function, Periodic.

http://members.optusnet.com.au/scottsmedley/fvwm/periodic.patch

Apply with: patch -p0  periodic.patch

It is similar to the Schedule builtin except the function is invoked
every N milliseconds - even if a grab fails, or the function fails
to execute for some other reason.

It will allow the user to do something like:

Periodic 1000 Echo Testing the Periodic builtin.
Deschedule $[schedule.last]
Periodic 1000 42 Echo Testing Periodic with explicit command Id.
Deschedule 42

Please tell me what you think of this proposed functionality.

SCoTT. :)