Marc wrote:
> Thank you very much, here is my sequence who does what I want, 
>                 <sequence>
>                     <command name="selectFile" parameter="openFileURL %d"/>
>                     <set expression="%_" variable="NomFichier" 
> plainString="true"/>
>                     <get expression="$NomFichier"/>
>                     <set variable="Liste" 
> expression="join(document($NomFichier)//@name,' ')"/>
>                     <get expression="$Liste"/>
>                     <command name="pick" parameter="'Choisir AccrocheLien'  
> false %_"></command>
>                 </sequence>
> 

Congratulation for your macro!

Possible simplification (unless you need to keep $NomFichier handy for
other uses):
---
<sequence>
  <command name="selectFile" parameter="openFileURL %d"/>
  <get expression="join(document('%_')//@name,' ')" />
  <command name="pick" parameter="'Choisir AccrocheLien' false %_" />
</sequence>
---



> but now I want to bind this to an event when the user add a element <A>.

You cannot do that. You need to add a toolbar button or a custom binding
which not only inserts an <A> (or if some text is selected, converts
selected text to an <A>) but also, after that, immediately triggers the
above macro.

Reply via email to