Page 1 of 1

SeedCode Calendar Free Script

PostPosted: Mon Jan 28, 2008 1:47 pm
by sedonamtb
Hello, I am trying to figure out how to modify a duplicate of the script:

Move Date Left or Right ( Target ) { Direction }

So that it only goes to the next day without having to click a button. I cannot figure out how to modify the values for Target and Direction to cause the script to just simply go to the next day.

I am writing a script that will automatically create 16 records for each day.
I've written the script to create the 16 records and enter data but I need to loop to the next day, then the next.... for the next couple of years and certainly don't want to do in manually.

I need to create the 16 records as each row represents a cabin. It is a reservation calendar for a resort.

I hope this makes sense. Thanks in advance for your help!

PostPosted: Mon Jan 28, 2008 2:11 pm
by John Sindelar
Hi. Most of the script you mentioned is about "drawing" the day (making sure the week and filters are set, etc.). If you just need to switch the focus of the calendar to another day in your script, simply set the field Filters::CalFilterDateGlob to the day you're interested in.

When you're done, call the script "Move Date Left or Right ( Target ) { Direction }" with the parameter "Target = Today" to refresh the display.

Hope that helps.

PostPosted: Mon Jan 28, 2008 2:49 pm
by sedonamtb
Thanks I got it to work.

What the script now does is create the 16 records then set CalFilterDateGlob +1 which put me in the next day. Then runs the script "Move Date Left or Right ( Target ) { Direction } " and it works perfect. The loop this and I'm set until 2020.

Thanks!
Susan