i have a script (see below) to read my milestones and add the events to ical.
on adding folder items to this_folder after receiving added_items
tell application "Microsoft Excel"
repeat with anitem in added_items
open anitem
print out active sheet
set ProjectName to the value of cell "$F$4"
set ReviseDate to the value of cell "$Z$4" as string
tell (get value of range "D12:Z12") to set these_Dates to list 1
my Schedule(ProjectName, ReviseDate, these_Dates)
close front window
end repeat
end tell
end adding folder items to
on Schedule(ProjectName, ReviseDate, these_Dates)
set the_titles to {"All Tooling Patterns in HK", "Rough Ceramics", "Tooling Quote Submitted", "Casting Ceramics", "Approval of Casting Ceramics", "Rough Ceramics to Tempe", "Tooling PO in HK", "Tooling Start", "Paintmaster in HK", "Production Quote Submitted", "Production Facility Confirmed", "1st Shot Samples", "Blister Layout in HK", "1st Deco Samples", "Mock-up Packaging Samples", "Packaging Artwork in HK", "EP Samples", "Production PO in HK", "Release Printing", "Release Injection", "Release Decoration", "PP Samples", "1st Shipment"}
set tc to count the_titles
tell application "iCal"
if (exists calendar ProjectName) then delete calendar ProjectName
set theCal to make new calendar at end of calendars with properties {title:ProjectName, color:{37500, 0, 0}, description:ReviseDate}
tell theCal to repeat with i from 1 to tc
set t_date to item i of these_Dates
if (t_date is not "N/A" and t_date is not "" and t_date is not "NA" and t_date is not "on hold") then ¬
tell (make new event at end of events with properties {start date:t_date, summary:item i of the_titles, location:ProjectName, allday event:true, status:confirmed, description:ReviseDate})
make new display alarm at end of display alarms with properties {trigger interval:-10080}
end tell
end repeat
quit
end tell
end Schedule
-
How can i modify the script to take one of the dates in the cells and add 7 days, then make new event from this with certain properties? For example…if cell F10 has 5/10/07 as the data. How can i tell applescript to take that data, add 7 days (5/17/07), and make new event with alarm and name, etc.
-
The alarms are becoming useless…as i have 50 alarms every day. Instead of adding an alarm for every event, is there a way to just make all events of a specific day (like 7 days in advance) to be listed in a new email? This way i can scan thru the email and remove the unneeded alarms