The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
function the_TIME_now()
{
var date=new Date()
var hours=date.getHours()
var mins=date.getMinutes()
if (mins < 10)
mins="0"+mins
var secs=date.getSeconds()
if (secs < 10)
secs="0"+secs
the_time=hours+mins+secs
the_time_now=setTimeout("the_TIME_now()",001)
return the_time_now
while( eventStart != the_time_now)
the_TIME_now()
while (eventStart == the_time_now)
alert('NOW!')
}
var eventStart=prompt("What time does it start?","")
It doesn't work (I *think*) because the eventStart time is never and never can be the_time_now. I did a test for this and it proved moi correct. The problem is, I have no idea of how to resolve this.
Can you help?
Cheers
Thanks a lot for that I may actually be able to watch something I want to now :-D
Any idea where I went wrong?
Cheers again :-D
Enter the time in 24 hour type, like '18:50' or '09:15', etc
You can ignore the bullet point check boxes, but if you change between them the Script seems to stop working, but try this for now
=======================================
> Don't appear to have anything like that I'm afraid. It's actually a
> tricky little script your after :o)
Hehe :-) It's sole purpose is to let me know when a programme I want to watch is starting because I always seem to lose track of time when I'm on the computer.
>
> When someone enters some input into the prompt box, what layout are
> you intending???
>
> i.e.
>
> 03:15
> 3:15pm
> 15:15
>
> ...etc?
at first I was after 14:30:00 type thang, simply because I couldn't be bothered to get rid of the seconds :-D
At the moment though it's 153000 because I wanted to actually get it working before I made it look nicer :-) I thought that was actually the problem at first but now I'm not so sure it is.
When someone enters some input into the prompt box, what layout are you intending???
i.e.
03:15
3:15pm
15:15
...etc?
> I tried a little alterations, and managed to completely crash my
> computer, so I won't suggest what I wrote.
>
Heh :-D
> I might have something saved somewhere though, check back in a little
> bit ok
Ok, cheers :-D
I might have something saved somewhere though, check back in a little bit ok
> Did you create this yourself of get it from another Web Site/Book etc?
I wrote it myself.
> Not to sure about this one. The only thing I can see so far is that if
> you change the while bits to if statments, it will keep looping until
> the alert bit is true:
>
> if (eventStart != the_time_now) {
> the_TIME_now();
> } else {
> alert('NOW!')
> }
I tried that originally and it didn't work, and it still doesn't now. Bah. Thanks anyway.
if (eventStart != the_time_now) {
the_TIME_now();
} else {
alert('NOW!')
}