im not sure what you mean.
my current script is below. (i know its lng and badly written…im slowly learning though)
all of the dates would need to check to see if it is 2 or 4 digits for the year… and then if it is 2 digits, they need to add the 20 to the begining to make it a 4 digit year before inputting 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" as string
set ReviseDate to the value of cell "$Z$4" as string
set ToolDate to the value of cell "$K$12"
set PaintDate to the value of cell "$L$12"
set VendorDate to the value of cell "$N$12"
set FirstShot to the value of cell "$O$12"
set Blister to the value of cell "$P$12"
set firstDeco to the value of cell "$Q$12"
set Mockup to the value of cell "$R$12"
set Artwork to the value of cell "$S$12"
set TRI to the value of cell "$S$12"
set EP to the value of cell "$T$12"
set PODate to the value of cell "$U$12"
set PPDate to the value of cell "$Y$12"
my Schedule(ProjectName, ReviseDate, ToolDate, PaintDate, VendorDate, FirstShot, Blister, firstDeco, Mockup, Artwork, TRI, EP, PODate, PPDate)
close front window
end repeat
end tell
end adding folder items to
on Schedule(ProjectName, ReviseDate, ToolDate, PaintDate, VendorDate, FirstShot, Blister, firstDeco, Mockup, Artwork, TRI, EP, PODate, PPDate)
tell application "iCal"
activate
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 calendar ProjectName
if (ToolDate is not "N/A" and ToolDate is not "" and ToolDate is not "NA" and ToolDate is not "on hold") then
make new event at end of events with properties {start date:ToolDate, location:ProjectName, summary:"Tooling PO", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (PaintDate is not "N/A" and PaintDate is not "" and PaintDate is not "NA" and PaintDate is not "on hold") then
make new event at end of events with properties {start date:PaintDate, location:ProjectName, summary:"Paintmaster", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (VendorDate is not "N/A" and VendorDate is not "" and VendorDate is not "NA" and VendorDate is not "on hold") then
make new event at end of events with properties {start date:VendorDate, location:ProjectName, summary:"Vendor", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (FirstShot is not "N/A" and FirstShot is not "" and FirstShot is not "NA" and FirstShot is not "on hold") then
make new event at end of events with properties {start date:FirstShot, location:ProjectName, summary:"1st Shots", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (Blister is not "N/A" and Blister is not "" and Blister is not "NA" and Blister is not "on hold") then
make new event at end of events with properties {start date:Blister, location:ProjectName, summary:"Layout", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (firstDeco is not "N/A" and firstDeco is not "" and firstDeco is not "NA" and firstDeco is not "on hold") then
make new event at end of events with properties {start date:firstDeco, location:ProjectName, summary:"1st Deco", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (Mockup is not "N/A" and Mockup is not "" and Mockup is not "NA" and Mockup is not "on hold") then
make new event at end of events with properties {start date:Mockup, location:ProjectName, summary:"Mock-up", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (Artwork is not "N/A" and Artwork is not "" and Artwork is not "NA" and Artwork is not "on hold") then
make new event at end of events with properties {start date:Artwork, location:ProjectName, summary:"Packaging", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (TRI is not "N/A" and TRI is not "" and TRI is not "NA" and TRI is not "on hold") then
make new event at end of events with properties {start date:(TRI + weeks), location:ProjectName, summary:"TRI", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (EP is not "N/A" and EP is not "" and EP is not "NA" and EP is not "on hold") then
make new event at end of events with properties {start date:EP, location:ProjectName, summary:"EP", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (PODate is not "N/A" and PODate is not "" and PODate is not "NA" and PODate is not "on hold") then
make new event at end of events with properties {start date:PODate, location:ProjectName, summary:"PO", allday event:true, status:confirmed}
end if
end tell
tell calendar ProjectName
if (PPDate is not "N/A" and PPDate is not "" and PPDate is not "NA" and PPDate is not "on hold") then
make new event at end of events with properties {start date:PPDate, location:ProjectName, summary:"PP", allday event:true, status:confirmed}
end if
end tell
quit
end tell
end Schedule