[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
XWidgetSoft Forum • View topic - Show txt on a time ?

XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently April 16th, 2024, 9:37 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 30 posts ] 
Author Message
 Post subject: Show txt on a time ?
PostPosted: October 18th, 2013, 7:23 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887


Attachments:
unnamed.jpg
unnamed.jpg [ 154.1 KiB | Viewed 9873 times ]

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/
Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 18th, 2013, 11:01 pm 
Offline
User avatar

Joined: March 8th, 2013, 10:27 pm
Posts: 353
Component names cannot be started with a number. That's true for every programming language
Name texts with a preceeding character like "num1" etc..
then eval("num"+core1.get(null,"%Hour")).Effect.Glow.Enabled = true;
:mrgreen:

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 19th, 2013, 1:01 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Thanks man!!! And what about the colour of the txt? I will set it from the designer?

Edit: Never mind.. I just read your note in DA! :)

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 19th, 2013, 6:37 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 19th, 2013, 4:01 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268
Without changing the naming system you have used

function datetimecore1OnUpdate(Sender)
{
ResetAllColors(); ---------------------------------------------------------------------- ADD this line
eval(datetimecore1.get("%WeekEn")).Font.Color = rgba(41,1,214,255);
eval(datetimecore1.get("%AMPM")).Font.Color = rgba(197,16,16,255);
eval("num"+datetimecore1.get("%Hour0")).Font.Color = rgba(0,93,171,255); //hour0
eval("min"+datetimecore1.get("%Minute0")).Font.Color = rgba(0,20,171,255); //minute0
}

function ResetAllColors() // reset colors -------------------------------------------------- ADD this function
{
for (var m=0; m<60; m++) // count up the minutes 0-59
{
eval("min" + ("0" + m).slice(-2)).Font.Color = rgba(0,0,0,0); // reset all mins to transparent
}
for (var h=1; h<12; h++) // count up the hours 1-12
{
eval("num" + ("0" + h).slice(-2)).Font.Color = rgba(0,0,0,0); // reset all nums to transparent
}
eval(AM).Font.Color = rgba(0,0,0,0);
eval(PM).Font.Color = rgba(0,0,0,0);
eval(Monday).Font.Color = rgba(0,0,0,0);
eval(Tuesday).Font.Color = rgba(0,0,0,0);
eval(Wednesday).Font.Color = rgba(0,0,0,0);
eval(Thursday).Font.Color = rgba(0,0,0,0);
eval(Friday).Font.Color = rgba(0,0,0,0);
eval(Saturday).Font.Color = rgba(0,0,0,0);
eval(Sunday).Font.Color = rgba(0,0,0,0);
}

//To reduce system resources this code only need to run if the time/seconds = 0
//this could be add with an IF statement at the start of the function datetimecore1OnUpdate(Sender)


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 19th, 2013, 6:08 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Thanks meme!!! Excellent work! :D
Now works as it should, BUT damm, the cpu consumption makes the widget unusable... :(
No way to reduce it..?

This happens because of the number of the txts???
If yes, I have an idea! Is a full screen widget. So I can take a screenshot with all the numbers in black, so I can delete all the bottom txts and leave all the other that use the script code! :idea:

Edit:
I did it, I notice some improvement with the cpu but is still high.. So the code causes it..? :?

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 19th, 2013, 6:58 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268


Last edited by meme on October 19th, 2013, 7:21 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 19th, 2013, 7:20 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 19th, 2013, 7:40 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 19th, 2013, 7:58 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 19th, 2013, 8:47 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 2:45 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 3:05 am 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
this widget looks great!
if you can upload the widget,i think i can reduce the code and components.


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 4:02 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887


Attachments:
insanity_time_full_screen(1).xwp [1.08 MiB]
Downloaded 293 times

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/
Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 4:45 am 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
how to handle the time 15:12:12? minute and second are the same, second text will cover the minute text.


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 5:58 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Yes, as the original design (this is actually an Android lwp) the seconds will cover the minute txt but only for one sec when the values will be the same. That's why there are different colours for each part. At the beginning it seemed strange to me too but there is no other option I think..
The difficult part is to fix the cpu consumption with the secs active..

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 7:45 am 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
high cpu usage only at starting.
2% ~ 3% after loading.

you can lower the cpu usage by decreasing the glow effect softness


Attachments:
insanty_time_2.xwp [1.08 MiB]
Downloaded 282 times
Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 7:50 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Thanks qiancang but I notice two issues:
1) One txt appears deleted (between to AM and 12). Is the number 42 that is missing.
2) One second txt remains visible..
Look:


Attachments:
111.jpg
111.jpg [ 253.3 KiB | Viewed 9822 times ]

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/
Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 7:54 am 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
i deleted all the "min" components :)
the second issue does not happen on my PC


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 7:59 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 8:10 am 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 8:14 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Ok qiancang. Thank you VERY MUCH for you help! :)

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 12:19 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
meme what do you think..? Download the qiancang's widget to check the alternative code..

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 4:57 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 20th, 2013, 9:08 pm 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
one mistake: please replace if(s!=mm) with if(s!=m) in about line 55


Attachments:
mistake.png
mistake.png [ 6.03 KiB | Viewed 9802 times ]
Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 21st, 2013, 1:32 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 21st, 2013, 2:05 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 21st, 2013, 3:45 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
I start a third test widget using the code by digigamer. I'm starting to add the seconds txts in the widget and add the extra similar fields in the script for the seconds... Let's see how the widget will work..

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 21st, 2013, 3:49 am 
Offline
User avatar

Joined: March 8th, 2013, 10:27 pm
Posts: 353
So this is what you asked! Isn't it? With blinking seconds???

Another version: Shows seconds in green, minutes in royal blue and avoids conflicts between seconds and minutes falling at the same time ex: 04:16:16 PM
File comment: Screenshot (scaled to reduce my data)
demo.jpg
demo.jpg [ 46.2 KiB | Viewed 9791 times ]



(Default Image removed to save my data... currently running mobile broadband, costly. Just generate a new one.)

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
 Post subject: Re: Show txt on a time ?
PostPosted: October 21st, 2013, 4:03 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group