Perform task x number of times

37 views
Skip to first unread message

David Allen

unread,
Oct 9, 2019, 8:52:58 PM10/9/19
to TiddlyWiki
I'm wanting to create a button a specific number of times.  This number is calculated using values passed in to a macro, so I don't know what the exact value will be every time.

I'm thinking something along these lines:

x=4
<$list filter="limit of x">
thing_to_do
</$list>

output should be: 

thing_to_do
thing_to_do
thing_to_do
thing_to_do

I've seen this done somewhere before and I think it was blindingly easy but I don't remember how it was done or where it was done and I can't seem to google this problem right.  Anyone heard of this?

Mark S.

unread,
Oct 9, 2019, 10:47:44 PM10/9/19
to TiddlyWiki
Like

\define do-us(num)
<$list filter="[range<__num__>]">
thing to
do <br/>
</$list>
\end

<<do-us 5>>


Reply all
Reply to author
Forward
0 new messages