How do i make a clock that counts down to a date? Thread last updated on 2007-10-13 09:04:16

Posted by member 378304 on 2007-10-10 15:15:04

Hi. I want to make a clock that counts down to a date, but how? I want it to take the countdown info from a website that counts down to a date.

If you don't know what i mean i can try to explain better.

Posted by member 1 on 2007-10-10 18:40:57 link

Determine the difference between your current date and your countdown date. Use xLabel to update a txt file with the distance in it and update it every time your clock changes. This is not an easy script but it is possible.

Posted by member 212670 on 2007-10-10 22:09:38 link

From what I can tell, he will be getting the countdown difference from the website itself. If that's the case, here's an example:

edit - code removed because someone thought parsing between code /code tags was a good idea.

Click Here

Posted by member 378304 on 2007-10-11 05:59:16 link

so all i need to do is the paste that code into my theme.rc and change the url to the url i want to use?

Edit: this is the website im planing to take the countdown from:

http://www.lakai.com/06/intros/ffcountdown.html

Posted by member 212670 on 2007-10-11 08:43:31 link

No, that was just an example of how you could do it. That looks like javascript, and I don't know how you would pull that down.

Posted by member 378304 on 2007-10-11 09:12:52 link

Ok. On the site which is used in the example you can make your own count down clock. But when i replace the url with that one i get some scrape errors.

LINK

Posted by member 212670 on 2007-10-11 15:06:43 link

Like I already said, you can't simply replace the URL. You really need to open up the wazup doc and read it. I'm not saying that in a mean way. It's just that's how you learn. That said, though, I redid my file. Example 2 works for your link. Reload it and there you go. Click Here

To understand what's up, you'll want to look at your link's source code, the counterInputString in my example, and the wazup help file. If you study all three together, it should become more clear how it works.

Posted by member 378304 on 2007-10-11 16:02:56 link

Thanks a lot man :D I probably shouldn't ask this since you told me to read the source code and such. but what do i have write if i want to use the alternative version?

Posted by member 212670 on 2007-10-12 03:54:27 link

Alternative version?

Posted by member 378304 on 2007-10-12 04:17:30 link

LINK

the alternative version is what i want. because the one i have now basicly says the same, because 35 days is 858 hours and 858 hours is 51482 minutes etc.

you understand?

Posted by member 212670 on 2007-10-12 13:18:43 link

"you understand?"

Nope.

Posted by member 378304 on 2007-10-12 13:39:13 link

look at the timanddate link. Under it says 35 days, 8 hours, 43 minutes and 45 seconds(or whatever it says when you look at it) and not 35 days, 848 hours etc. I want it to count down the way the alternative version does.

I belive this is the source code for it http://www.pastebin.org/4721

Understand now?

Posted by member 212670 on 2007-10-12 16:18:44 link

Ok, I see the alternative version. I made the new "InputString," which works perfectly, but I don't really want to post it until I've seen some sort of effort from you.

Don't be afraid to try and fail. It's how you learn. Atleast post something you've attempted, and then I'll share the new answer.

Posted by member 378304 on 2007-10-12 16:25:25 link

fair enough. I can give you an example of what i have tried. I sat for about 2-3 hours yesturday with some javascript guy. He made a script and i had to use Pyscript.dll to make it work with litestep. The problem with it was that it sent a bang every second which slowed down my system so much that i couldn't use it.

i have also tried this: http://www.pastebin.org/4695 and lots of others.

Posted by member 212670 on 2007-10-12 17:04:38 link

See Example #3 for the new InputString: Click Here

Notice how you can exclude a bunch of crap in the InputString with {*}, and any extra text/formatting can be done with the OutputString.

Posted by member 378304 on 2007-10-12 17:23:32 link

Thanks man :D

This is how it turned out: http://img37.picoodle.com/img/img37/9/10/12/f_showofm_4155b1c.png

Everything is litestep. Except the Firefox window

Posted by member 212670 on 2007-10-12 19:39:08 link

Hey, that's pretty sharp. Very clean looking.

Posted by member 378304 on 2007-10-13 09:04:16 link

Thanks :)