Yes, the script I tried was not the correct script. It batch changed the capture date to the same date for all selected images. I need a script that allows me to select a number of images and automatically change the title of the image file to "(date) at (time)" so that an image would be named "3/9/2017 at 13:31:01" if the photo was taken on March 9, 2017 at 1:31:01 in the afternoon. Leonie had written a script that allow me to do that, and it worked in an earlier version of Photos, but that script, which can still be accessed from the services menu in Photos, no longer works.
Is there a new version of that script, or did Automator change in some way so that I would have to rewrite it. For example, the script you pointed me to is as follows:
set timeIncrement to 1 -- the time increment in minutes
(* select at least 2 images in Photos *)
tell application "Photos"
activate
set imageSel to (get selection)
if (imageSel is {}) or (the length of imageSel < 2) then
error "Please select at least two images."
else
set first_image to item 1 of imageSel
set first_date to (the date of first_image) as date
repeat with i from 2 to count of imageSel
set next_image to itemi of imageSel
set next_date to (the date of next_image) as date
set time_difference to (first_date - next_date) + ((i - 1) * timeIncrement * minutes)
tell next_image
set the date of next_image to (next_date + time_difference) as date
end tell
end repeat
end if
return "Adjusted the date and time of " & (the length of imageSel) & " photos. The last date is " & ((the date of next_image) as date)
end tell
There should be a way to tell photos to select the date and time the first image was created, then set the title to be {"date" at "time}, then select the next image file, select the date and time that second image was created, then set the title to be {"date" at "time}, etc. until it has done that with all the selected images. I know there was script language that did that before.