Is it possible to send timed pagerefresh (F5) through a txtTheme (kioskmode)?

26 views
Skip to first unread message

Måns

unread,
Jun 19, 2010, 7:02:58 PM6/19/10
to TiddlyWiki
Hi TwWizards

I'm trying to develop a customized TW to be run in a infokiosk
setting.
Normal pc with XP (for writing info, inserting pictures etc) ->
automatic refresh on info pc (I believe its a IBX-530-ATOM. Fanless
Intel® Atom™ Embedded System) Monitors are big Samsung widescreen
monsters with the IBX boxes mounted at the back, hanging on walls...
They have internet and local network connection.
At the moment we use WebSiteBaker for the job, Its very simple and the
slides are shown as a screensaver changing single htmlpages from
websitebaker on the monitors.
However I'd like to add some TW-magic to this process - and I've come
to the conclusion that its just a matter of figuring out how to make
my slideshow refresh the browser at timed intervals - to make it work
as intended (showing latest info)...

I've tried to run hta's http://technet.microsoft.com/en-us/library/ee692926.aspx
with vba-scripts to remove titlebar and autorefresh using a timer....
However theres a lot of things which just don't work in IE ie the
tiddler height settings (based on tags) I've made in the stylesheet
for one ...
I'd like to use Google Chrome in fullscreen mode instead - however I
need my systemTheme or a specialized macro to autorefresh page (F5) to
get the latest info...
It should NOT need any manual work on the embedded systems at all -
except for opening the browser with the initiated txtTheme in
fullscreenmode... (http://dl.dropbox.com/u/3105342/TW/ProtoTyper/
HUSLIDE/HUSlide.html#txtTheme:InfoTilstand HovedSlide)
Do you know how I can make it work with autorefresh of page (F5)?

Here's my prototype (still needs some css-work I know..):http://
dl.dropbox.com/u/3105342/TW/ProtoTyper/HUSLIDE/
HUSlide.html#TestInfoTilstand (click "Test" in mainmenu to se the
resulting slideshow inline, intended for monitors)

regards Måns Mårtensson

Mike

unread,
Jun 20, 2010, 9:31:07 AM6/20/10
to TiddlyWiki
<script>setTimeout("story.closeAllTiddlers();restart();",60000);</
script>

If this is placed in MainMenu or another startup tiddler it should
refresh the entire document every 60000ms (10 min)

Mike

On Jun 19, 6:02 pm, Måns <humam...@gmail.com> wrote:
> Hi TwWizards
>
> I'm trying to develop a customized TW to be run in a infokiosk
> setting.
> Normal pc with XP (for writing info, inserting pictures etc) ->
> automatic refresh on info pc (I believe its a IBX-530-ATOM. Fanless
> Intel® Atom™ Embedded System) Monitors are big Samsung widescreen
> monsters with the IBX boxes mounted at the back, hanging on walls...
> They have internet and local network connection.
> At the moment we use WebSiteBaker for the job, Its very simple and the
> slides are shown as a screensaver changing single htmlpages from
> websitebaker on the monitors.
> However I'd like to add some TW-magic to this process - and I've come
> to the conclusion that its just a matter of figuring out how to make
> my slideshow refresh the browser at timed intervals - to make it work
> as intended (showing latest info)...
>
> I've tried to run hta'shttp://technet.microsoft.com/en-us/library/ee692926.aspx

Måns

unread,
Jun 20, 2010, 11:08:16 AM6/20/10
to TiddlyWiki
Hi Mike
Thanks for the script:
> <script>setTimeout("story.closeAllTiddlers();restart();",60000);</script>
> If this is placed in MainMenu or another startup tiddler it should
> refresh the entire document every 60000ms (10 min)
Can I somehow make sure this only happens when my InfoTheme is active?
ie put the script into a <div only active in the infoPageTemplate? -
And make sure that the pagerefresh falls back to the initial Url ie
#txtTheme:InfoTilstand HovedSlide ?

regards Måns Mårtensson

Eric Shulman

unread,
Jun 20, 2010, 11:39:21 AM6/20/10
to TiddlyWiki
> Can I somehow make sure this only happens when my InfoTheme is active?
> ie put the script into a <div only active in the infoPageTemplate? -
> And make sure that the pagerefresh falls back to the initial Url ie
> #txtTheme:InfoTilstand HovedSlide ?

If you use
http://www.TiddlyTools.com/#SwitchThemePlugin
then you can define extra theme slices in the [[InfoTheme]]
tiddler....

|Init|InfoThemeInit|
|Reset|InfoThemeReset|

Then, in [[InfoThemeInit]], write:

window.refreshTimerID=setTimeout("story.closeAllTiddlers();restart();",
60000);

and in [[InfoThemeReset]], write:
clearTimeout(window.refreshTimerID);

When [[InfoTheme]] is applied, the code in [[InfoThemeInit]] is
invoked *after* the theme is loaded. Then, if you subsequently switch
to another theme, the code in [[InfoThemeReset]] is applied *before*
switching to the next theme.

ref: http://www.TiddlyTools.com/#SwitchThemePluginInfo

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Mike

unread,
Jun 20, 2010, 11:41:07 AM6/20/10
to TiddlyWiki
The URL should not change. . . (should be able to test and verify, my
url is file:///E:/documents/tw/TestWiki.htm#chkRandomTheme:true with
no problems)
The div should also work if referenced via your theme as specified or
just via ViewTemplate <span macro="tiddler myRestartScript"></span>

HTH,
Mike

Måns

unread,
Jun 20, 2010, 1:34:12 PM6/20/10
to TiddlyWiki
Hi Eric

> |Init|InfoThemeInit|
> |Reset|InfoThemeReset|
>
> Then, in [[InfoThemeInit]], write:
>
> window.refreshTimerID=setTimeout("story.closeAllTiddlers();restart();",
> 60000);
>
> and in [[InfoThemeReset]], write:
>    clearTimeout(window.refreshTimerID);
Thanks for helping me in integrating the pagerefresh script into the
Theme..
I had a peek at TotallyTiddlers and figured out how to get the slices
and sections "communicate".
It works like a charm:
https://dl.dropbox.com/u/3105342/TW/ProtoTyper/HUSLIDE/HUSlide.html#InfoTilstand
In action: http://dl.dropbox.com/u/3105342/TW/ProtoTyper/HUSLIDE/HUSlide.html#txtTheme:InfoTilstand
HovedSlide

cheers Måns Mårtensson

Måns

unread,
Jun 20, 2010, 1:55:03 PM6/20/10
to TiddlyWiki
Hi again
Now I've run through the cycle a few times - and it is only refreshed
1 time - and not again? I will test it with FF when i get a chance -
for now I have to use Google Chrome...
[[InfoTilstand]]
Here's my code:
|Init|InfoTilstand##init|
|Reset|InfoTilstand##reset|
!!!!!init
//{{{
window.refreshTimerID=setTimeout("story.closeAllTiddlers();restart();",
60000);
//}}}
!!!!!reset
//{{{
clearTimeout(window.refreshTimerID);
//}}}


On 20 Jun., 19:34, Måns <humam...@gmail.com> wrote:
> Hi Eric
>
> > |Init|InfoThemeInit|
> > |Reset|InfoThemeReset|
>
> > Then, in [[InfoThemeInit]], write:
>
> > window.refreshTimerID=setTimeout("story.closeAllTiddlers();restart();",
> > 60000);
>
> > and in [[InfoThemeReset]], write:
> >    clearTimeout(window.refreshTimerID);
>
> Thanks for helping me in integrating the pagerefresh script into the
> Theme..
> I had a peek at TotallyTiddlers and figured out how to get the slices
> and sections "communicate".
> It works like a charm:https://dl.dropbox.com/u/3105342/TW/ProtoTyper/HUSLIDE/HUSlide.html#I...
> In action:http://dl.dropbox.com/u/3105342/TW/ProtoTyper/HUSLIDE/HUSlide.html#tx...
> HovedSlide
>
> cheers Måns Mårtensson

Måns

unread,
Jun 20, 2010, 2:26:46 PM6/20/10
to TiddlyWiki
Maybe this the way to go, for the embedded systems:
http://windowssecrets.com/support-alert/2008/06/19/14-Free-auto-refresh-add-ins-for-your-browser
- however I haven't found a plugin for Google Chrome yet..

regards Måns Mårtensson

Måns

unread,
Jun 20, 2010, 2:55:51 PM6/20/10
to TiddlyWiki
I found a specialized html/javascript code for refreshing browser/page
here:
http://www.myrefresher.com/samples/javascript_html_refresh_code.html.zip
However I don't know if it's any better than the codebit I've got
already - or how to implement it. It seems that you'll have to have it
written directly into the htmlbody:
Scriptsnippet:
<script language="JavaScript">
<!--

var surl = unescape(window.location.pathname);

function doLoad()
{
// the timeout value should be the same as in the
"refresh" meta-tag (6 seconds)
setTimeout( "refresh()", 6000 );
}

function refresh()
{
// This version of the refresh function will cause a
new
// entry in the visitor's history. It is provided
for
// those browsers that only support JavaScript 1.0.
//
window.location.href = surl;
}
//-->
</script>

<script language="JavaScript1.1">
<!--
function refresh()
{
// This version does NOT cause an entry in the
browser's
// page view history. Most browsers will always
retrieve
// the document from the web-server whether it is
already
// in the browsers page-cache or not.
//
window.location.replace( surl );
}
//-->
</script>

<script language="JavaScript1.2">
<!--
function refresh()
{
// This version of the refresh function will be
invoked
// for browsers that support JavaScript version 1.2
//

// The argument to the location.reload function
determines
// if the browser should retrieve the document from
the
// web-server. In our example all we need to do is
cause
// the JavaScript block in the document body to be
// re-evaluated. If we needed to pull the document
from
// the web-server again (such as where the document
contents
// change dynamically) we would pass the argument as
'true'.
//
window.location.reload( false );
}
//-->
</script>
</head>
<!--
Use the "onload" event to start the refresh process.
-->
<body onload="doLoad()">
<script language="JavaScript">
<!--
// we put this here so we can see something change
document.write('<b>' + (new Date).toLocaleString() + '</
b>');
//-->
</script>
regards Måns Mårtensson

On 20 Jun., 20:26, Måns <humam...@gmail.com> wrote:
> Maybe this the way to go, for the embedded systems:http://windowssecrets.com/support-alert/2008/06/19/14-Free-auto-refre...

Måns

unread,
Jun 20, 2010, 3:15:46 PM6/20/10
to TiddlyWiki
Is it possible to use the <META tag in the customized pagetemplate to
invoke the pagerefresh routine??
<META
HTTP-EQUIV="Refresh"
CONTENT="5; URL=http://MySlideShow#txtTheme">

regards Måns Mårtensson

Mike

unread,
Jun 22, 2010, 12:44:50 AM6/22/10
to TiddlyWiki
Neither solution worked?

The simple script worked in my testbed, although it seems ELS's
solution would be more elegant
I also made a mistake above 60000 = 2 min 600000 = 10 min +/-

http://www.strm.us/tw/testwiki.htm

I Modified my CustomViewTemplate to transclude TimedRestart - and I
changed it from a restart to a reload - I think this is what you are
looking for, not sure why it it not working as you desire. . .
(Restart closes tiddlers and start over without reloading the entire
document vs reload i.e. F5)

Also, as another idea, you could put the script at the last slide, and
have it reload the TW xx ms after the last slide loads (might be
easier to get the timing down)

HTH, (still no dropbox access, sorry if this is not relevant)

Mike

Mike

unread,
Jun 22, 2010, 12:47:03 AM6/22/10
to TiddlyWiki
Arghh - wrong link above.. .
http://www.strm.us/tw/testwiki.htm#chkRandomTheme:true

Mike

Måns

unread,
Jun 22, 2010, 9:18:50 AM6/22/10
to TiddlyWiki
Hi Mike

I think you're right about the restart/reload thing. What I was really
after was restart, however I found another way to do it inside the TW
- I used an iframe showing the document in slideshowtheme-mode and
put this script inside it:
<script>
setTimeout("story.refreshTiddler('$2',null,true)",$1);
</script>
where $ is {{tiddler.title}} and $2 is milliseconds untill restart. I
used a section for this {{store.getTiddlerText("ThemeTitle##time")}}
and Eric's editSectionPlugin to deliver an UI for setting time.
<<editSection ThemeTitle##time label "tooltip">>

>http://www.strm.us/tw/testwiki.htm#chkRandomTheme:true

Great and sensational - you REALLY experiment with your experimental
wiki :-) It's very inspiring - Thanks for sharing!

When I have finished another theme (SlideShowTheme based on the plugin
SlideShowPlugin) I will put it on TiddlySpot for you to see. Maybe
later today...

Cheers Måns Mårtensson

Måns

unread,
Jun 22, 2010, 12:08:55 PM6/22/10
to TiddlyWiki
Hi Mike
> - and I changed it from a restart to a reload - I think this is what you are
> looking for, not sure why it it not working as you desire. . .
> (Restart closes tiddlers and start over without reloading the entire
> document vs reload i.e. F5)
Argh - That was exactly my first priority - however there are some
isues*
Here's the slidetheme in action http://tinyurl.com/3a5wnkn - *when it
reloads (after 45000 ms) it doesn't open with the initial url - maybe
it's due to the closeAllTiddlers bit?
> Also, as another idea, you could put the script at the last slide, and
> have it reload the TW xx ms after the last slide loads (might be
> easier to get the timing down)
Good idea, however I'd like as much freedom for the user as possible.
I think it's enough that you'll have to start with the same slide for
every slideshow ("HovedSlide")
> HTH, (still no dropbox access, sorry if this is not relevant)
Now it's placed on TiddlySpot - alas it's in Danish - hope you'll get
the point anyway:
http://infoslide.tiddlyspot.com/
Theme: http://infoslide.tiddlyspot.com/#InfoTilstand

Cheers Måns Mårtensson

okido

unread,
Jun 22, 2010, 12:36:41 PM6/22/10
to TiddlyWiki
Ever thought about iMacros with Firefox, you should able to pull the
right url==tiddlywiki tiddler at timed intervals.

Have a nice day, Okido

On 22 June, 18:08, Måns <humam...@gmail.com> wrote:
> Hi Mike> - and I  changed it from a restart to a reload - I think this is what you are
> > looking for, not sure why it it not working as you desire. . .
> > (Restart closes tiddlers and start over without reloading the entire
> > document vs reload i.e. F5)
>
> Argh - That was exactly my first priority - however there are some
> isues*
> Here's the slidetheme in actionhttp://tinyurl.com/3a5wnkn- *when it

Måns

unread,
Jun 22, 2010, 2:17:25 PM6/22/10
to TiddlyWiki
Hi Okido
Thanks for the tip
However I'm trying to make the TW somewhat browseragnostic - and have
everything packed in the document, not having to rely on external (or
browserspecific macros)...
I found the ReloaderPlugin for Google Chrome, which works out of the
box - again it's an external solution.
I also made a three html-files reloader solution based on the <META>
tag.
1) The TW: http://db.tt/8I0Xxm
2) TWframe (iframe with TW + metatag and timer ): http://db.tt/op9I9c
3) TWframeServer (iframe with TWframe - to be able to invoke the
reload routine via the metatag): http://db.tt/ZYz0Eb
All three in a zipfile: http://db.tt/Py4mbj

Still I would prefer to be able to serve the TW document within it's
own theme with autoreload...

regards Måns Mårtensson

On 22 Jun., 18:36, okido <bkn...@gmail.com> wrote:
> Ever thought about iMacros with Firefox, you should able to pull the
> right url==tiddlywiki tiddler at timed intervals.
>
> Have a nice day, Okido
>
> On 22 June, 18:08, Måns <humam...@gmail.com> wrote:
>
>
>
> > Hi Mike> - and I  changed it from a restart to a reload - I think this is what you are
> > > looking for, not sure why it it not working as you desire. . .
> > > (Restart closes tiddlers and start over without reloading the entire
> > > document vs reload i.e. F5)
>
> > Argh - That was exactly my first priority - however there are some
> > isues*
> > Here's the slidetheme in actionhttp://tinyurl.com/3a5wnkn-*when it

Måns

unread,
Jun 22, 2010, 2:36:27 PM6/22/10
to TiddlyWiki
Hmm
> 1) The TW:http://db.tt/8I0Xxm
> 2) TWframe (iframe with TW + metatag and timer ):http://db.tt/op9I9c
It actually seems to suffice with only these two htmls - I had just
tested it locally - online it seems to me that nr 2 html with metatag
and timer does the job...

regards Måns Mårtensson

Måns

unread,
Jun 22, 2010, 8:46:21 PM6/22/10
to TiddlyWiki
Hi Mike
Last post on this subject -
> Neither solution worked?
All of them did :-) for different purposes...
> The simple script worked in my testbed, although it seems ELS's
> solution would be more elegant
I second that, therefore I've made a new systemTheme [[InfoMode]]
Here: http://infoslide.tiddlyspot.com/#InfoMode...

The solution in my case was: window.location.reload();
init became:
window.refreshTimerID=setTimeout("story.closeAllTiddlers();
window.location.reload();",
store.getTiddlerText("InfoMode##reloadtime"));

Simple but very effective :-)

Thanks for all your help..
Cheers Måns Mårtensson

Mike

unread,
Jun 22, 2010, 11:02:16 PM6/22/10
to TiddlyWiki
Looking through it now, a nice solution, simple but effective, and
easy to customize to future needs

Glad you got it working !

Mike
Reply all
Reply to author
Forward
0 new messages