Part of the Samples Website. 8/16/97.


«Creates a calendar folder structure
«inspired by Chris Gulker at the SF Examiner
«editors deposit articles into folders, one folder for each issue
«customize this script by filling in your startDate and number of days
local (startDate = date ("1/2/94")) «fill in your date here
local (countDays = 150) «number of days to generate calendar for
local (folder)
if not file.getFolderDialog ("Choose a folder to contain calendar", @folder)
folder = folder + Finder Calendar:
file.sureFolder (folder) «make sure the folder exists
«initialize the day, month, year, etc variables
local (day, month, year, hour, minute, second)
date.get (startDate, @day, @month, @year, @hour, @minute, @second)
local (makenewweek = true, weekfolder, daycount = 0, i)
for i = 1 to countDays
dayname = string.nthField (date.set (day, month, year, 0, 0, 0), ';', 1)
if makenewweek
weekfolder = folder + "Week of " + dayname + ":"
file.newFolder (weekfolder)
makenewweek = false
window.msg (dayname)
file.newFolder (weekfolder + dayname + ":")
if daycount equals 7
daycount = 0
makenewweek = true

This page was last built on Sat, Aug 16, 1997 at 6:36:13 PM. You can download the current set of sample scripts from our FTP site. Dave