Clock and date in letter format Thread last updated on 2007-08-07 16:13:07

Posted by member 378304 on 2007-07-22 08:12:23

Hi. I want to have my clock and date in a letter form.

Ex .

Date: 02.07 becomes Monday July second
Time: 11.25 becomes ElevenTwenty-five

Is this possible? If it is, how do i do it?

Sorry if this is posted in the wrong forum category, i signed up here today

Posted by member 1 on 2007-07-22 08:50:38 link

Date I believe is DDDD instead of just DD and Month is MMMM instead of MM. I don't know if you can do the same with Time. And welcome to hell. :P

Posted by member 378304 on 2007-07-22 10:05:41 link

Not like that. I should have explained better. Thanks for your help anyways :)

Look here http://customize.org/screenshots/51576/download?v=48012 I want my clock like that. I aksed the person who did the screenshot and she said that someone else made it. So she could'nt help me.

Anyone know how to get the clock like that?

Posted by member 1885 on 2007-07-22 10:57:25 link

Well, uh, is that LiteStep in the screenshot to begin with?

TBH I'm not sure if xLabel/xStatsClass can do words instead of numbers, at least not for time. And if the xModules can't do it, I doubt that any other module can. I'm not sure though, have a peek in the xLabel/xStatsClass docs.

Posted by member 378304 on 2007-07-22 11:09:56 link

yes it is litestep. I asked the person who took the shot and she said so

Posted by member 1 on 2007-07-22 12:22:49 link

If xLabel can't do it...maybe a LUA script?

Posted by member 378304 on 2007-07-22 12:58:15 link

maybe, she sent me another message and said it was some script that i had to use

Posted by member 5575 on 2007-07-22 13:05:25 link

You could have hidden xlabels with independent entries for day, minutes, hour, etc., then have the labels export their values as evars. A script could then translate the numeric entries for each item into the corresponding text string. Lots of work for little gain though, IMO. ;)

Posted by member 256241 on 2007-07-22 14:17:59 link

Why don't you just get her to email you the theme she uses as lift the code out?

Posted by member 378304 on 2007-07-22 14:20:42 link

because she did'nt make it. She gave me the name of the guy who made the code for the clock so i sent him a message.

Posted by member 1 on 2007-07-22 14:23:48 link

No...xanmolbjerg asked if you had the theme mailed to you from her. Whether she made it or not doesn't matter...just get the .rc files for it and put the related stuff in your current theme

Posted by member 256241 on 2007-07-22 20:34:46 link

Yea, cheers DevilBoi.

It's not like litestep is compiled then distributed and you're looking for the source or something. For any machine running litestep, you also have all the code of what's going on.

Just get the theme and start opening up those files.

Posted by member 378304 on 2007-07-23 05:34:51 link

i know i can just copy the code out from the theme.rc file (i'm not a total noob). My problem is that she won't send me anything!

Posted by member 375904 on 2007-07-23 06:50:19 link

All her themes are just "screenshots", no download. Are you sure the theme even exists?

Posted by member 5575 on 2007-07-24 12:02:22 link

Other than in Photoshop?

Posted by member 378304 on 2007-07-29 07:13:02 link

She said a guy that called himself Aero had made it. i have sent him a PM but he has not replyed yet.

And i know it's not photoshoped because she is a very good customizer.

Posted by member 1 on 2007-07-29 08:58:45 link

Why is she refusing to send you the theme? Aero is a good guy...haven't seen him around for a long long time though. You may check irc though.

Posted by member 248213 on 2007-07-30 10:41:45 link

Its quite possible with xStatsclass and xLabel.
You may need muliple labels, but I dont think so.

Valid formats for [date], [time], and [uptime]

The [date], [time], and [uptime] data sources can optionally take a format as a parameter. The following character sequences will be interpreted in the format (anything else is included verbatim):

m
month (1-12)
mm
month with leading zero (01-12)
mmm
abbreviated month name (Jan, Feb, etc)
mmmm
full month name (January, February, etc)
d
day (1-31)
dd
day with leading zero (01-31)
ddd
abbreviated weekday name (Sun, Mon, etc)
dddd
full weekday name (Sunday, Monday, etc)
y
day of the year
yy
2-digit year
yyyy
4-digit year
h
hour (1-12)
hh
hour with leading zero (01-12)
i
hour (0-23)
ii
hour with leading zero (00-23)
n
minute (0-59)
nn
minute with leading zero (00-59)
s
second (0-59)
ss
second with leading zero (00-59)
am/pm
lowercase am/pm indicator
AM/PM
capitalized AM/PM indicator


You can even capitalize text with the capitalize() escape sequence.
Read the documentation.

Posted by member 375904 on 2007-07-30 16:30:30 link

Partially it can be done with the normal xLabel and xStatsclass. But in the theme as pictured not only the name of the month and weekday are spelled out but also all the numbers.

That is not in the format-definitions. It may be possible to create a script that converts numbers to text and updates a text-label once per second.

That is a very interesting idea and would be quite a good job if it exists.

Posted by member 212670 on 2007-07-30 16:42:29 link

It's definitely possible to script it, just as Boreas mentions above. You wouldn't even need to force an update at all. xLabel has a built in event for when text changes (I think it's just OnTextChange).

Posted by member 212670 on 2007-07-30 17:57:34 link

Posted by member 1 on 2007-07-30 19:10:36 link

Good work xcal. I guess you aren't a troll after all. :P

Posted by member 212670 on 2007-07-30 19:50:45 link

Haha thanks.

Posted by member 378304 on 2007-08-03 11:29:58 link

i talked to Aero on irc and said that it was ok for her to send it to me, so she'll send it to me tomorrow.

Thanks for all your help :)

Posted by member 375904 on 2007-08-04 19:47:40 link

Cool, please upload it if it works.

Posted by member 378304 on 2007-08-07 16:13:07 link

so apperently she had rescripted the code so it works better, becuse im geting error messages for each minute. She used Mzscript.dll to do this.

This is the code for the current clock, if anyone knows how to rescript this into hers, please tell me how. She won't give me the special code. Nevermind the foobar code that's in there.

Code in script.rc:

*Script start !startup
*Script start !mojotime

*Script bang !startup
*Script exec !LabelInfoExport _cds_cur "[line('$PersonalDir$foobar.rc',2)]"
*Script exec !LabelRefresh Cover CoverImage "%{_cds_cur}\folder.png"
*Script exec !varremove _cds_cur
*Script ~bang

*script bang !texttime
*script exec !varset d "%#DATE_%{day}%#"
*script gotoif ("%{hour}:%{minute}" = "12:00") noon
*script gotoif ("%{hour}:%{minute}" = "0:00") midnight
*script exec !varset h %{hour}
*script exec !varset m %{minute}
*script exec !ifeval ("%{h}" > "11") '|varadd h -12'
*script exec !ifeval ("%{h}" = "0") '|varset h 12'
*script exec !varset h "%#TIME_%{h}%#"
*script exec !ifeval ("%{m}" < "10") {|varset m "O' %#TIME_%{m}%#"} else {|varset m "%#TIME_%{m}%#"}
*script exec !LabelSetText Time " [date('dddd, mmmm')] %{d} %{h} %{m} [time('am/pm')]"
*script exit
*script label midnight
*script exec !LabelSetText Time " [date('dddd, mmmm dd')] Midnight"
*script exit
*script label noon
*script exec !LabelSetText Time " [date('dddd, mmmm dd')] Noon"
*script ~bang

Code in theme.rc:

*Timer timer #s 1s !execute [!startup][!texttime][!netunloadmodule timer-0.5]

*mzScriptFile "$ConfigDir$script.rc"
mzBangChar |
mzScriptUseStep false
mzListSeparator :
mzAutosaveVars immediately
mzScriptOldSyntax false
mzNoStartOnRefresh true
mzScriptNoCreate false