Thanks very much !
This solved my problem.
I've used the same mechanism as the doc-macro.

I've coded a javascript macro called "mymacro"
I use now the below code to invoke it when I click on the invoke. 

<$button set="$:/state/SampleReveal2" setTo="invoke">Invoke macro</$button>
<$reveal type="match" state="$:/state/SampleReveal2" text="invoke">
<<mymacro 3 40 52>>
</$reveal>

Is it the best way to do that ?

Regards





Le vendredi 4 août 2017 17:54:22 UTC+2, Mark S. a écrit :
>
> The .example macro is defined in $:/editions/tw5.com/doc-macros. But it 
> just wraps a reveal widget around the macro, so it may not be what you want.
>
> What do you want to accomplish? Macros look like functions in programming 
> languages, but often they work very differently. 
>
> Good luck,
> Mark
>
> On Friday, August 4, 2017 at 8:07:22 AM UTC-7, vpl wrote:
>>
>> Hi,
>>
>> I cannot find a way to invoke a macro from a button
>>
>> In the reference tiddly I've found what I need
>> For example the macro exemple "now Macro (Examples)"
>> A "try it" button invoke the now macro.
>>
>> But this is done through another generic macro called ".example"
>> <$macrocall $name=".example" n="1" eg="""<<now>>"""/>
>>
>> *I can't find nowhere this code as an example that I could get some 
>> inspiration from ..*
>>
>> Can someone help me ?
>>
>> Regards
>>
>> Vpl
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a60fe280-7a12-4320-a387-2f812a5ed492%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to