[New Plugin] Delay Actions, defer the execution of action widgets for a set amount of time

148 views
Skip to first unread message

Jed Carty

unread,
May 7, 2020, 7:42:53 AM5/7/20
to TiddlyWiki
I needed a break from my other work, so I made an action widget that can add a delay to the execution of other action widgets.

Enjoy.

Hubert

unread,
May 7, 2020, 8:13:59 AM5/7/20
to TiddlyWiki
Thank you for sharing Jed, amazing work and extremely useful.

Regards,
Hubert

Saq Imtiaz

unread,
May 7, 2020, 8:37:41 AM5/7/20
to TiddlyWiki
I have a few custom action widgets that could be useful in conjunction with this, will try to post them up sometime soon. I really need to get better at that.

Rohrreiniger

unread,
May 7, 2020, 10:19:06 AM5/7/20
to TiddlyWiki
Hello Jed,

as a newbie I have to ask, what is it good for? Do you may have an example? Thanks in advance.

BR

Mohammad

unread,
May 7, 2020, 12:05:54 PM5/7/20
to TiddlyWiki
Wonderful!
 I think it is also useful for tooltips and popups on mouse hover a link!

Thank you Jed!

--Mohammad

Mark S.

unread,
May 7, 2020, 2:11:59 PM5/7/20
to TiddlyWiki

DON'T RUN THE FOLLOWING CODE! Unless you're prepared to reboot your TW. It gives you a button to start a timer that every 10 seconds posts the seconds to the subtitle. You might want this feature if you were tracking how much timer you were spending on a project. What's critically missing is a method to turn off the timer! It will keep going even if you change the name of the internal macros, so I guess they must be compiled at the start. I'm thinking a reveal widget that depends on the existence of another tiddler could be used to turn off the timer.

If you hit the button a second time, it will start a second thread (not really a thread), and the subtitle will switch back and forth between the two different cumulative times.


\define timer()
<$action-setfield
   $tiddler
='$:/SiteSubtitle'
   text
=<<cum>>
/>
<$set filter="[<cum>add[10]]" select=0 name=cum>
<$action-delay delay='10' actions=<<timer>>>
</
action>
</$set>
\end
\define timerstart()
<$action-delay delay='1'>
</
$action>
   
\end

<$vars cum=0>
<$button>
Start timer <<cum>>
<<timer>>
</$button>
</
$vars>


Jed Carty

unread,
May 7, 2020, 2:27:08 PM5/7/20
to TiddlyWiki
I can't really say I am too worried about infinite recursion loops, but it is interesting that it continues after renaming the macro.
For things like this I am planning on making a pulse plugin that gives a periodic pulse that can trigger action widgets. Set it to check whatever conditions you want and use that to set times or other conditions for actions to happen automatically.

Mark S.

unread,
May 7, 2020, 3:13:49 PM5/7/20
to TiddlyWiki
Added to TiddlyWiki Toolmap under Developer / advanced tools.


On Thursday, May 7, 2020 at 4:42:53 AM UTC-7, Jed Carty wrote:

David Gifford

unread,
May 7, 2020, 6:14:08 PM5/7/20
to TiddlyWiki
Mark, you beat me to it by 2 hours. Thank you!

Jan

unread,
May 8, 2020, 5:59:04 AM5/8/20
to tiddl...@googlegroups.com
Hi Jed,
this ist great. I could have used for this at least 5 Projects already.
Thank you!

Jan
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e793e4cb-dc06-4c21-a931-b06ab9037880%40googlegroups.com.

Jed Carty

unread,
May 8, 2020, 6:32:52 AM5/8/20
to TiddlyWiki
It turns out I already made a plugin that runs things periodically about 2 years ago, perhaps one day I will remember what I have made. https://ooktech.com/TiddlyWiki/TimerActions/
Reply all
Reply to author
Forward
0 new messages