Hello,
Below is an Applescript that works in Leopard.
It's a modification of a script I've posted here before.
http://discussions.apple.com/thread.jspa?messageID=1030250󻡪
Best wishes
John M
--Copy below this line into Script Editor and click run --
--Annual Week numbers
--John Maisey
--4/2/5
--Modified for Leopard
--3/3/8
----
set numberOfWeeks to 52 -- change as needed
set daysText to "MonTueWedThuFriSatSun"
set aDate to (current date)
set day of aDate to 1
set month of aDate to January
set aDay to weekday of aDate
set weekNo to 1
--Day of week as num. starting with 0
set aDayText to (characters 1 thru 3 of (aDay as text)) as text
set dayOff to ((offset of aDayText in daysText) - 1) / 3 as integer
if dayOff is less than 5 then
set StartDate to aDate - dayOff * days
else
set StartDate to aDate + (7 - dayOff) * days
end if
tell application "iCal"
set newCal to make new calendar at end of calendars with properties {title:"Week No."}
set myCal to (count of every calendar)
end tell
repeat with myCount from 1 to numberOfWeeks
if (month of StartDate is December) and (day of StartDate is greater than 28) then set weekNo to 1
if (month of StartDate is January) and (day of StartDate is less than 5) then set weekNo to 1
set weekText to "Week No. " & weekNo
tell application "iCal"
tell calendar myCal
make new event at end of events with properties {start date:StartDate, end date:StartDate + (7 * days), allday event:true, summary:weekText}
end tell
end tell
set weekNo to weekNo + 1
set StartDate to StartDate + 7 * days
end repeat
--