On Wednesday, September 12, 2018 at 7:53:56 AM UTC-7, Hubert wrote: > > I'm trying to perform some actions based on the time of day. I'm unable to > get the current date/time without resorting to a button push that sets a > timestamp in a field that will serve as the state for the reveal widget. > Is there a way for the state text reference to automatically update or at > least get wikified? When I place <<now hh>> in my state tiddler, the reveal > widget only returns a match if "<<now hh">> is referenced directly. > Matching <<now hh>> as a state tiddler value with a "12" for the time > returns nothing. >
Instead of using the "state" param, use the "default" param. This param allows you to specify the state value using a variable, instead of a stored tiddler field value. Thus: <$reveal default=<<now hh>> type="gt" text=12> It's after noon </$reveal> enjoy, -e Eric Shulman TiddlyTools.com: "Small Tools for Big Ideas!" (tm) InsideTiddlyWiki: The Missing Manuals Here's my code (one that involves a manual refresh button). I would be > grateful for suggestions. Thank you! > > \define RefreshButton() > <$button actions=<<RefreshButtonAction>>> > Refresh</$button> > \end > > \define RefreshButtonAction() > <$action-setfield $field="timestamp" $value=<<now hh>>/> > \end > > <$reveal state="!!timestamp" type="gt" text=12> > It's after noon > </$reveal> > > <<RefreshButton>> > > Best regards, > Hubert > > > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/30394542-2c35-48d7-932e-53737d76c61d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

