>
> Thanks again for your help and apologies for my awkward phrasing.
>
> I can see that this code still works across the whole TW. What it does is 
> navigate to the tiddler on the top of the story river (the action), but the 
> scope of this action is still global, i.e. the key combination will trigger 
> the navigate action no matter what tiddler is currently top of the story 
> river.
>
> What I'm trying to achieve instead is trigger some action (doesn't really 
> matter what action) by the assigned key combination ONLY IF a specified 
> tiddler, say HelloThere, is currently top of the story river.
>
> In short: I hit alt+h and nothing happens UNLESS HelloThere is currently 
> opened. I'd add actions afterwards, what I'm trying to define is the scope 
> for the action.
>
> Is this possible?
>

yes, you do this by filtering:

<$navigator story="$:/StoryList" history="$:/HistoryList">
<$list filter="[list[$:/StoryList]first[]removeprefix[HelloThere]suffix[]]">
<$action-sendmessage $message="tm-close-other-tiddlers" $param={{{ 
[list[$:/StoryList]first[]] 
}}}/>
<$action-navigate $to={{{ [list[$:/StoryList]first[]] }}}/>
</$list>
</$navigator> 

removeprefix[HelloThere] makes sure that the tiddler title starts with 
"HelloThere" (replace it with your tiddler-title)
suffix[] makes sure that it's not HelloThere...ere...ere (...)


-- 
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/672e6db6-aaf8-4fdc-8f94-da4a26781e15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to