A script to count the days down to a birthday, christmas, new years etc... Has anyone ever made one? I know I could edit an event for each day but is there something already out there that each day initiat and say 23 more days til ---- Then you could fill in the blank depending on what you are waiting for? Is it even possible?
Announcement
Collapse
No announcement yet.
Script that would initiat countdown.
Collapse
X
-
ppTags: None
-
Hi,
its not too bad...
You can use the DateAdd function to add or subtract a specified time interval from a date. For example, you can use DateAdd to calculate a date 30 days from today or a time 45 minutes from now. To add days to date, you can use Day of Year ("y"), Day ("d"), or Weekday ("w").
Stuart
Comment
-
pp
Well I dont have the capability. I have been reading alot on VBScripts but I am far from writing one from scratch. I think it would be neat to have something that could have a set day countdown and maybe a setting to say or reflect a variable. Birthday, wedding etc....XMAS!! hehe
Comment
-
pp
No Rupp,
More an announcement each day but a webpage counter would be a neat touch. Is there already a new years countdown that could be revamped?
Comment
-
JustOneMore
Sounds like a good idea. Would be neat for my 5 year old waking up and hearing " 11 more days to Christmas!" and so on.
Comment
-
pp
Ahhh Rupp, That would be just as good if not simpler interface to use. Sounds like a good approach.
Comment
-
pp,
Here's a real quick script that you can run in an event that will create a reminder. It's basic but you can duplicate the code any number of times you want for different events. You can put this code in a reocurring event that euns every day but it will only create the need event when the dates are appropriate. So every year it will work
Code:sub main() dtStartDate = DateValue("12-11-2004") dtEndDate = DateValue("12-25-2004") strTimeToAnnounce = "8:01 PM" intDays = dtEndDate - dtStartDate strWhatToSay = "It's " & intDays & " days until Christmas" If dtEndDate >= Date Then intIndex = hs.NewEvent("CountDown") Set ev = hs.GetEvent(intIndex) ev.misc = &H10 ev.ev_date = Date ev.ev_time = strTimeToAnnounce ev.ev_abs_time = 0 ev.speech = strWhatToSay End If end sub
Comment
-
pp
-
pp
Okay, I was just reviewing each line with my newfound script knowledge(which isn't much). Trying to go line by line to understand it....
Comment
Comment