I’ve got an Applescript for InDesign CS6 on Mountain Lion and the simplest task of setting a date’s time seems to no longer work. I can create a new date object (d) initialized with the current date, change each value
set d to current date --works fine
set month of d to tempMonth --works fine
set day of d to tempDay --works fine
set year of d to “20” & tempPubYear --works fine
set dayOfWeek to weekday of d --works fine
set time of d to 0 --ERROR
It used to work in earlier versions of InDesign/Mac OS X but now that last line shows up as an error. What is going on? I checked d and my variables and all are showing what they should be showing, except that darn time won’t change to zero.
set d to current date --works fine
set month of d to 1 --works fine
set day of d to 1 --works fine
set year of d to "20" & "12" --works fine
set dayOfWeek to weekday of d --works fine
set time of d to 0 -- NO ERROR
d
--> date "Sunday, January 1, 2012 12:00:00 AM"
And taking it out of the tell block changes the error message to “Adobe InDesign CS6 got an error: Can’t set time of date “Monday, October 14, 2013 4:21:50 PM” to 0.”