1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
<?xml version="1.0" encoding="UTF-8" ?>
<!-- $Id$ -->
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"../docbook-xml/docbookx.dtd"
[
<!ENTITY % myents SYSTEM "../fvwm.ent" >
%myents;
]>
<section id='Schedule'>
<title>Schedule</title>
<cmdsynopsis>
<command>Schedule</command
><arg choice='opt'>Periodic</arg
><arg choice='plain'
><replaceable>delay_ms</replaceable
></arg
><arg choice='opt'
><replaceable>command_id</replaceable
></arg
><arg choice='plain'
><replaceable>command</replaceable
></arg>
</cmdsynopsis>
<para>The
<replaceable>command</replaceable>
is executed after about
<replaceable>delay_ms</replaceable>
milliseconds. This may be useful in some tricky setups. The
<replaceable>command</replaceable>
is executed in the same context window as the
<emphasis remap='B'>Schedule</emphasis>
command. An optional integer argument
<replaceable>command_id</replaceable>
may be given in decimal, hexadecimal or octal format. This id can
be used with the
<fvwmref cmd="Deschedule"/>
command to remove the scheduled command before it is executed. If
no id is given, fvwm uses negative id numbers, starting with -1
and decreasing by one with each use of the
<emphasis remap='B'>Schedule</emphasis>
command.
Note that the
<emphasis remap='B'>Schedule</emphasis>
command and its arguments undergo the usual command line
expansion, and, when
<replaceable>command</replaceable>
is finally executed, it is expanded again. It may therefore be
necessary to quote the parts of the command that must not be
expanded twice.</para>
<para>Note: A window's id as it is returned with $[w.id] can be used as
the
<replaceable>command_id</replaceable>.
Example:</para>
<programlisting>
<fvwmref cmd="Current"/> Schedule 1000 $[w.id] <fvwmref cmd="WindowShade"/>
</programlisting>
<para>The
<emphasis remap='B'>Schedule</emphasis>
command also supports the optional keyword
<fvwmopt cmd="Schedule" opt="Periodic"/>
which indicates that the
<replaceable>command</replaceable>
should be executed every
<replaceable>delay_ms</replaceable>.
Example:</para>
<programlisting>
Schedule Periodic 10000 <fvwmref cmd="PipeRead"/> '[ -N "$MAIL" ] && echo \
Echo You have mail'
</programlisting>
<para>Use the
<fvwmref cmd="Deschedule"/>
command to stop periodic commands.</para>
</section>
|