2 problems with below script:
-
I keep getting this error:
get value of cell “$Z$4”
date “Tuesday, May 15, 2007 12:00:00 AM”
“Can’t make ‘constant e141’ into type number.” -
occaisionally i get an error that says TRIDate is not defined.
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
set TRIDate to ((the value of cell "$S$12") + 7 * days) 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 tell
on Schedule(ProjectName, ReviseDate, these_Dates)
set the_titles to {"Toolings Due", "Rough Ceramics", "Tooling Quote", "Casting Ceramics", "Approve Castings", "Ceramics to Tempe", "Tooling PO", "Tooling Start", "Paintmasters", "Vendor Quote", "Vendor Confirmed", "1st Shot", "Blister Layout", "1st Deco", "Packaging Mock-ups", "Packaging CD", "EP", "Vendor PO", "Release Printing", "Release Injection", "Release Decoration", "PP", "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:{0, 20000, 50000}, 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 ¬
make new todo at end of todos with properties {dueDate:t_date, summary:item i of the_titles, status:confirmed, description:ProjectName, url:ReviseDate}
end repeat
tell theCal to make new todo at end of todos with properties {dueDate:TRIDate, summary:"TRI CD", status:confirmed, description:ProjectName, url:ReviseDate}
quit
end tell
end Schedule