[tw5] Triggering ActionWidget (e.g., action-setfield) programmatically from a macro

Hi, I’m trying to understand how to programmatically add a field or tag to a tiddler.

I’m trying to auto add tag or field to my tiddlers. My thought was to use a macro, such that whenever I add it to a tiddler’s text, the macro adds a tag or field value to the current tiddler.

Examples on TW5 show a button that needs to be clicked, but I’m looking to do something like the following:

\define todo()
To Do
<$action-setfield field=“mytodo” value=“todo”/>

\end

You can rewire the save tiddler button to check for the presence of words in tiddler text and if yes, execute actions. I assume the search operator will come handy.

2 Likes