You can't use a parameter with spaces in the name (e.g., you can't use "now 
format" as a parameter). You also can't create field names with spaces in 
them.

Substituting hyphens for spaces, and a few other changes, this might be 
closer to what you want:

\define NEW-TIDDLER(now-format:"XXX" 
tags:"XXX" tags-show:"XXX" text:"XXX" comment:"XXX")
<div style="float:left;"><$button><$action-sendmessage 
$message="tm-new-tiddler" title=<<now $now-format$>> tags="""$tags$""" 
tags-show="""$tags-show$""" text="""$text$""" 
comment="""$comment$"""/><span 
style="color:blue;">''BUTTON-NAME-HERE''</span></$button></div>
\end

<<NEW-TIDDLER
now-format:"XXX" 
tags:"XXX" 
tags show:"XXX" 
text:"XXX" 
comment:"XXX" 
">>




On Friday, December 4, 2020 at 8:50:45 AM UTC-8 [email protected] wrote:

> Hello,
>
> I have a question about creating a macro.
> https://tiddlywiki.com/static/Macros%2520in%2520WikiText.html
>
> I have to make a lot of buttons in my wiki and I have this code for a 
> button for creating a new tiddler; (It works fine.)
>
> `<div style="float:left;"><$button><$action-sendmessage 
> $message="tm-new-tiddler" title=<<now format:"TITLE-TIDDLER-HERE">> 
> tags="TAG-NAME-HERE" tags show="TAG-NAME-HERE" text="TEXT-HERE" 
> comment="FIELD-COMMENT-HERE"/><span 
> style="color:blue;">''BUTTON-NAME-HERE''</span></$button></div>`
>
> How do I convert the above code into a macro?
>
> This is my attempt, but I can't get it done:
>
> `\define NEW-TIDDLER(now format:"XXX" 
> tags:"XXX" tags show:"XXX" text:"XXX" comment:"XXX")
> <div style="float:left;"><$button><$action-sendmessage 
> $message="tm-new-tiddler" title=<<$now format:$>> $tags$ $tags show$ $text$ 
> $comment$/><span 
> style="color:blue;">''BUTTON-NAME-HERE''</span></$button></div>
> \end
>
> <<NEW-TIDDLER
> now format:"XXX" 
> tags:"XXX" 
> tags show:"XXX" 
> text:"XXX" 
> comment:"XXX" 
> ">>`
>
> Thank you,
>
>
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4d191a48-d9d9-444d-b798-651e6285727en%40googlegroups.com.

Reply via email to