Hello,

You write:
> Yes, the search command is always executable, unless the document
> contains no text at all.

and moreover, when the search command fails, in a sequence, the
command after command search will not be executed.
>
> ---
> <sequence>
>   <command name="search" parameter="XXX" />
>   <command name="alert" parameter="found XXX" />
> </sequence>
> ---
>
> In the above sequence, if the search fails, you'll not see the alert
> dialog box.

Since the following choice-construct doesn't work either (the alert is
never displayed), I get the impression a failed search halts macro
execution completely. Is this correct?

Is there some way to test if a search command will fail? Or to pick up
macro execution after a failed search command?

<cfg:macro>
      <cfg:choice>
        <cfg:command name="search" parameter="silver"/>
        <cfg:command name="alert" parameter="Not found"></cfg:command>
      </cfg:choice>
    </cfg:macro>

Thanks,

Bert

Reply via email to