Hi Hubert,

Just wanted to see if you ever got this to work. I'm running into a similar 
problem at the moment with StartupActions. I could use a bit of insight 
into its workings.

Best wishes,

Adam

On Wednesday, June 27, 2018 at 11:27:07 AM UTC+1, Hubert wrote:
>
> Hi,
>
> I'm trying to make use of the new *StartupActions* 
> <https://tiddlywiki.com/static/StartupActions.html> functionality.
>
> I'm using TW on multiple computers with different screen sizes and what 
> I'm trying to do is maximise the browser window on startup IF the current 
> screen width ($:/info/browser/screen/width) matches 1366 pixels (laptop).
>
> I've created a tiddler named StartUp and tagged it with 
> $:/tags/StartupAction/Browser
>
> In the tiddler's text area, I've typed in the following code (the 
> dependency here is Evan Balster's formula macro):
>
> \define BlaBla()
> <$set name=screen_width value={{$:/info/browser/screen/width}}>
> <<Conditionals>>
> </$set>
> \end
>
> \define Conditionals()
> <$formula formula="if(($(screen_width)$=1366), 
> '<<MaximiseBrowserWindow>>', '')"/>
> \end
>
> \define MaximiseBrowserWindow()
> <$action-sendmessage $message="tm-full-screen"/>
> \end
>
> <<BlaBla>>
>
> Unfortunately this does nothing.
>
> For testing purposes, I've removed most of the above code and left out 
> just the action line:
>
> <$action-sendmessage $message="tm-full-screen"/>
>
> This does nothing either.
>
> I know it is strange just to place actions in tiddlers on their own but I 
> would have assumed that the trigger here is startup itself and the code 
> should be executed just because the tiddler is tagged as it should, as if 
> the whole snippet was a button action (?)
>
> Is there anything I'm missing here or is it just that, by design, actions 
> cannot be executed conditionally?
>
> Thank you for your input.
>
>
>

-- 
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/9927b507-4a7f-4fa0-a58a-01d3a47044ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to