Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Previous page Next page Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Page 2 of 2
Topic:
how to change background
This thread has 22 replies. Displaying posts 16 through 23.
Post 16 made on Saturday October 16, 2010 at 14:04
alpha
Long Time Member
Joined:
Posts:
September 2003
258
I just tried your xcf Lowpro and it works great.
Project Boredom 2 is here. [Link: mediafire.com]
------------------------
Check Version 1 & 2 out in the files section.
Post 17 made on Sunday October 17, 2010 at 07:14
Vesa Mäkelä
Founding Member
Joined:
Posts:
December 2001
22
Thank You very much Lowpro!

And it is so easy to add as many themes as you want !

Last edited by Vesa Mäkelä on October 17, 2010 14:43.
Post 18 made on Wednesday October 20, 2010 at 09:58
Vesa Mäkelä
Founding Member
Joined:
Posts:
December 2001
22
I wonder how can you change a theme based e.g. on time. So you could have theme 1 0:00-12:00, theme 2 12:00-15:00 and theme 4 15:00-24:00? Night theme, afternoon theme and evening theme?

Well, I figured out that you could use GUI.getDisplayTime() function. But how exactly?

Last edited by Vesa Mäkelä on October 20, 2010 10:13.
Post 19 made on Wednesday October 20, 2010 at 13:01
Lowpro
Select Member
Joined:
Posts:
March 2004
2,081
That's a neat idea. I'm not sure how you'd implement that via ProntoScript, but it may very well be possible. Perhaps others will chime in.
LP Related Links:
View my profile to access various
links to key posts and downloads.
Post 20 made on Wednesday October 20, 2010 at 13:54
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Write a function which checks the time, compares it with the time you want to change the theme, and (if past that time) sets the global variable accordingly.

Make this function a global library.

On page that you want the check to be done, reference the function in the page script and have it run, say every 30 seconds.

I use such functions a lot, for example a) to provide an alarm clock and b) to open/close my curtains at sunrise/sunset.
Post 21 made on Thursday October 21, 2010 at 09:53
Vesa Mäkelä
Founding Member
Joined:
Posts:
December 2001
22
I try to use your example. [Link: remotecentral.com]

I ended up using following script on my Home page:

var myTime = GUI.getDisplayTime();
if(myTime.substring(2, 3) == ":") {myHour = myTime.substring(0,2);}
else if(myTime.substring(1, 2) == ":") {myHour = myTime.substring(0,1);}
myHour=1*myHour;
if (myHour<7 || myHour>=22) {System.setGlobal ("Theme","1");
doPageStart();}
else System.setGlobal ("Theme","6");
doPageStart();
function doPageStart() {
doSetBkgd();
}
//
function doSetBkgd() {
if(System.getGlobal ("Theme")=="1") {
widget("Background").setImage(CF.widget("bkgd_1","Images","Resources").getImage(0),0); return;
}
if(System.getGlobal ("Theme")=="2") {
widget("Background").setImage(CF.widget("bkgd_2","Images","Resources").getImage(0),0); return;
}
if(System.getGlobal ("Theme")=="3") {
widget("Background").setImage(CF.widget("bkgd_3","Images","Resources").getImage(0),0); return;
}
if(System.getGlobal ("Theme")=="4") {
widget("Background").setImage(CF.widget("bkgd_4","Images","Resources").getImage(0),0); return;
}
if(System.getGlobal ("Theme")=="5") {
widget("Background").setImage(CF.widget("bkgd_5","Images","Resources").getImage(0),0); return;
}
if(System.getGlobal ("Theme")=="6") {
widget("Background").setImage(CF.widget("bkgd_6","Images","Resources").getImage(0),0); return;
}
else { System.setGlobal ("Theme","1");
widget("Background").setImage(CF.widget("bkgd_1","Images","Resources").getImage(0),0);
}
}

Last edited by Vesa Mäkelä on October 21, 2010 11:04.
Post 22 made on Friday October 22, 2010 at 01:04
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Note that this example does not account for 12 hour vs 24 hour clock. In fact, I think it assumes 24 hour clock.

For a quick and dirty way to ascertain which clock format is in use, see here:

[Link: remotecentral.com]
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 23 made on Sunday October 24, 2010 at 12:37
Vesa Mäkelä
Founding Member
Joined:
Posts:
December 2001
22
I cannot figure out how to have more than 2 possibilities (day/night). If I try to put more if sentences it does not work.

OK I figured it out. Use else if ...

Last edited by Vesa Mäkelä on October 25, 2010 12:11.
Page 2 of 2


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse