2021-05-02 18:26:50 +00:00
|
|
|
created: 20210227212730299
|
2024-09-10 09:49:41 +00:00
|
|
|
modified: 20240119151636562
|
2021-11-18 08:45:20 +00:00
|
|
|
tags: [[Macro Examples]]
|
2021-05-02 18:26:50 +00:00
|
|
|
title: unusedtitle Macro (Examples 1)
|
|
|
|
type: text/vnd.tiddlywiki
|
|
|
|
|
|
|
|
\define testCreate()
|
|
|
|
<$action-createtiddler $basetitle=<<unusedtitle template:"$count:2$-new">>/>
|
|
|
|
\end
|
|
|
|
|
|
|
|
\define testCreate1()
|
|
|
|
<$action-createtiddler $basetitle=<<unusedtitle baseName:"new" separator:"-" template:"$count:2$$separator$$basename$">>/>
|
|
|
|
\end
|
|
|
|
|
|
|
|
\define testNew()
|
|
|
|
<$action-sendmessage $message="tm-new-tiddler" title=<<unusedtitle baseName:"new" template:"$count:2$-$basename$">> />
|
|
|
|
\end
|
|
|
|
|
2024-09-10 09:49:41 +00:00
|
|
|
\define testStartCount()
|
|
|
|
<$action-createtiddler $basetitle=<<unusedtitle startCount:"10" baseName:"new" separator:"-" template:"$count:2$$separator$$basename$">>/>
|
|
|
|
\end
|
|
|
|
|
2021-05-02 18:26:50 +00:00
|
|
|
```
|
|
|
|
<<unusedtitle template:"$count:2$-new">>
|
|
|
|
```
|
|
|
|
|
|
|
|
<$button actions=<<testCreate>> >
|
|
|
|
<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/>
|
|
|
|
Create Tiddler
|
|
|
|
</$button>
|
|
|
|
|
|
|
|
```
|
|
|
|
<<unusedtitle baseName:"new" template:"$count:2$-$basename$">>
|
|
|
|
```
|
|
|
|
|
|
|
|
<$button actions=<<testNew>>>
|
|
|
|
<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/>
|
|
|
|
New Tiddler
|
|
|
|
</$button>
|
|
|
|
|
|
|
|
```
|
|
|
|
<<unusedtitle baseName:"new" separator:"-" template:"$count:2$$separator$$basename$">>
|
|
|
|
```
|
|
|
|
|
|
|
|
<$button actions=<<testCreate1>>>
|
|
|
|
<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/>
|
|
|
|
Create Tiddler
|
|
|
|
</$button>
|
|
|
|
|
2024-09-10 09:49:41 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
<<unusedtitle startCount:"10" baseName:"new" separator:"-" template:"$count:2$$separator$$basename$">>
|
|
|
|
```
|
|
|
|
|
|
|
|
<$button actions=<<testStartCount>>>
|
|
|
|
<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/>
|
|
|
|
Create Tiddler
|
|
|
|
</$button>
|
|
|
|
|
2021-05-02 18:26:50 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary>Show the code</summary>
|
|
|
|
<pre><code><$view><pre><code>
|
|
|
|
</details>
|