Diane Ward

Q: batch title change in photo version 1

The new "Photo" has changed the user interface completely.  Is there a way to to the "batch title change" for a group of photos?  There are instructions for how to do for one, but I'm hoping that this has not been lost.  I'm using version 1.

 

Is there any way to remove the conformation that is now required each and every time you want to delete a photo or group of photos? 

 

Thanks,

 

DMW

Posted on Apr 24, 2015 9:56 AM

Close

Q: batch title change in photo version 1

  • All replies
  • Helpful answers

Previous Page 2 of 3 last Next
  • by Jay Deitch,

    Jay Deitch Jay Deitch Apr 25, 2015 12:19 PM in response to léonie
    Level 2 (210 points)
    Apr 25, 2015 12:19 PM in response to léonie

    Hi Léonie,

     

    - Yes, I can change the titles manually by typing them in below the image in the Moment.  I can also paste in the new title.

    - The photos are all jpeg

    - I created a test library and the script works fine so it looks like the library is corrupt.  I'm repairing it now.  For those of you with similar problems, just hold down the Option and Command keys while starting up Photos to repair the library.

     

    I'll let you know what happens after the repair is finished.

     

    Thanks again for all your help.

    -Jay

  • by Jay Deitch,

    Jay Deitch Jay Deitch Apr 25, 2015 12:28 PM in response to Jay Deitch
    Level 2 (210 points)
    Apr 25, 2015 12:28 PM in response to Jay Deitch

    Ug!  The same error message appears with the repaired library...

     

    SS4.jpg

  • by Jay Deitch,

    Jay Deitch Jay Deitch Apr 26, 2015 9:17 AM in response to Jay Deitch
    Level 2 (210 points)
    Apr 26, 2015 9:17 AM in response to Jay Deitch

    Hi Léonie,


    I found another post of yours about rebuilding the iPhoto Library using iPhoto Library Manager.  I tried it (took all night), and it found a few photos that couldn't be imported to the rebuilt library.  It looked fine in iPhoto so I opened that library in Photos.  I get the same error when running the script.  I can't think anything else to try.  Maybe I'll just stick with iPhoto.


    -Jay

  • by Jay Deitch,

    Jay Deitch Jay Deitch Apr 26, 2015 9:24 AM in response to Jay Deitch
    Level 2 (210 points)
    Apr 26, 2015 9:24 AM in response to Jay Deitch

    I forgot to include this...

     

    Here are the Console messages I get when I run the script.  The first two happen as soon as I open the script.  The other three appear after I type in the title text:

     

    4/26/15 11:20:05.227 AM Automator Runner[2841]: -[AMApplicationRegistry loadDefinitionAtURL:]: No application name for definition at URL file:///Library/Automator/Office.definition/

    4/26/15 11:20:05.227 AM Automator Runner[2841]: -[AMApplicationRegistry _loadDefinitionsAtURLS:]: Failed to load definition at URL file:///Library/Automator/Office.definition/

    4/26/15 11:20:42.006 AM Photos[2832]: An exception was thrown during execution of an NSScriptCommand...

    4/26/15 11:20:42.006 AM Photos[2832]: *** -[__NSArrayM objectAtIndex:]: index 47333 beyond bounds for empty array

    4/26/15 11:20:42.384 AM WorkflowServiceRunner[2840]: WorkflowServiceRunner received error running Workflow Service at /Users/Jay/Library/Services/Batch Change Titles.workflow: The action “Run AppleScript” encountered an error.

     

    -Jay

  • by léonie,

    léonie léonie Apr 26, 2015 9:47 AM in response to Jay Deitch
    Level 10 (105,183 points)
    iLife
    Apr 26, 2015 9:47 AM in response to Jay Deitch

    Does the problem only occur when you run the workflow as a service and not when run from automator as a workflow?

     

    Then open the Activity Monitor (from Applications > Utilities).

    Do you see the "Automator Launcher " in the list of processes? Then kill it. The launcher may be hung.

  • by Jay Deitch,

    Jay Deitch Jay Deitch Apr 26, 2015 12:37 PM in response to léonie
    Level 2 (210 points)
    Apr 26, 2015 12:37 PM in response to léonie

    HI,

     

    With Activity Monitor open, "Activity Runner shows up when I launch the script from the Photos > Services menu.  It goes away as soon as I get the error message:

     

    Screen Shot 2015-04-26 at 2.16.37 PM.png

     

    If I open Automator (with Photos open and the photos still selected), Automator is shown in Activity Monitor and stays there until I close it (as it should).  If I execute the workflow from Automator I get a different error message:

     

    Screen Shot 2015-04-26 at 2.15.03 PM.png

     

    Since the script worked fine with a small, test Photos library, the problem is probably with the default Photos library (which is now named "Default Library (rebuilt)").

     

    I get a nice collection of Console messages while doing this:

     

    4/26/15 2:30:07.615 PM WorkflowServiceRunner[3005]: Failed to connect (colorGridView) outlet from (NSApplication) to (NSColorPickerGridView): missing setter or instance variable

    4/26/15 2:30:07.615 PM WorkflowServiceRunner[3005]: Failed to connect (view) outlet from (NSApplication) to (NSColorPickerGridView): missing setter or instance variable

    4/26/15 2:30:07.650 PM WorkflowServiceRunner[3005]: -[AMApplicationRegistry loadDefinitionAtURL:]: No application name for definition at URL file:///Library/Automator/Office.definition/

    4/26/15 2:30:07.650 PM WorkflowServiceRunner[3005]: -[AMApplicationRegistry _loadDefinitionsAtURLS:]: Failed to load definition at URL file:///Library/Automator/Office.definition/

    4/26/15 2:30:07.724 PM Automator Runner[3006]: -[AMApplicationRegistry loadDefinitionAtURL:]: No application name for definition at URL file:///Library/Automator/Office.definition/

    4/26/15 2:30:07.724 PM Automator Runner[3006]: -[AMApplicationRegistry _loadDefinitionsAtURLS:]: Failed to load definition at URL file:///Library/Automator/Office.definition/

    4/26/15 2:30:16.659 PM Photos[2997]: An exception was thrown during execution of an NSScriptCommand...

    4/26/15 2:30:16.659 PM Photos[2997]: *** -[__NSArrayM objectAtIndex:]: index 48158 beyond bounds for empty array

    4/26/15 2:30:17.084 PM WorkflowServiceRunner[3005]: WorkflowServiceRunner received error running Workflow Service at /Users/Jay/Library/Services/Batch Change Titles.workflow: The action “Run AppleScript” encountered an error.

     

    The messages at 2:30:07 are from running the workflow from Automator, the others are from running the scrips from Photos > Services.

    -Jay

  • by Jay Deitch,

    Jay Deitch Jay Deitch May 3, 2015 3:13 PM in response to Jay Deitch
    Level 2 (210 points)
    May 3, 2015 3:13 PM in response to Jay Deitch

    Hi again,

     

    I was reading through another thread - Where are photo file names? and inverseroom commented (pg. 5): "Wait a minute, I just found that when I select images in the Photos tab, the script won't work, but when I select them in albums > all photos, it does."   So I tried that with the script described in this thread (to batch change the titles) and it worked!  I've only tried it once, but once is one more time than it has ever worked before for me!

     

    Jay

  • by Old Toad,

    Old Toad Old Toad May 3, 2015 3:22 PM in response to léonie
    Level 10 (140,881 points)
    Photos for Mac
    May 3, 2015 3:22 PM in response to léonie

    I've tested a couple of the scripts on nef, cr2 and dng RAW files and they work as expected.

     

    OTsig.png

  • by MostCedric,

    MostCedric MostCedric May 4, 2015 1:32 PM in response to Diane Ward
    Level 1 (0 points)
    May 4, 2015 1:32 PM in response to Diane Ward

    Hello, I created a service to run the applescript BatchChangeTitles. However, it's very slow, it might take at least 1 minute to modify 100 photos.

     

    Is it normal? I cannot understand why, executing a loop to add a title is definitely not a heavy task.

  • by Old Toad,

    Old Toad Old Toad May 4, 2015 2:13 PM in response to MostCedric
    Level 10 (140,881 points)
    Photos for Mac
    May 4, 2015 2:13 PM in response to MostCedric

    The scripts that I've tired also take a while. I ran the entire library, 4755 items, with the script to put the file name into the title and that took several minutes.  The construction of the library is probably what slows down the execution of the scripts.

  • by MostCedric,

    MostCedric MostCedric May 4, 2015 2:24 PM in response to Old Toad
    Level 1 (0 points)
    May 4, 2015 2:24 PM in response to Old Toad

    Thank you. I see, it makes sense, because I have tested the script with a new library, there are only 10 photos inside, it takes less than 1 second to finish the task.

  • by Jay Deitch,

    Jay Deitch Jay Deitch May 4, 2015 2:31 PM in response to Old Toad
    Level 2 (210 points)
    May 4, 2015 2:31 PM in response to Old Toad

    Hi,

     

    I changed the titles on 100 photos in about 30 seconds on a mid 2011 MacBook Air with a 1.6 GHz Intel Core i5 processor.

     

    I'm using Léonie's original script:

     

    on run {input, parameters}

           -- batch change the title to the input

           tell application "Photos"

                activate

                set imageSel to (get selection)

                if imageSel is {} then

                     error "Please select an image."

                else

                     repeat with im in imageSel

                          tell im

                               set the name to input

                          end tell

                     end repeat

                end if

           end tell

           return input

    end run

     

     

    -- Jay

     

    o

    Model Name:

  • by lescornwell,

    lescornwell lescornwell May 12, 2015 4:37 AM in response to Jay Deitch
    Level 3 (502 points)
    Photos for Mac
    May 12, 2015 4:37 AM in response to Jay Deitch

    Thanks Jay,

    I also copied/made that Applescript, and it worked perfectly.

    But today the Automator Service no longer worked, so I built it again. Alas...

    Then I came across this text of yours [quote]"Wait a minute, I just found that when I select images in the Photos tab, the script won't work, but when I select them in albums > all photos, it does."[/quote]

    And indeed, I switched to Albums>All Photos and it worked.

    So I'm a happy camper again.

     

    Is there no way to change the script so that it either switches to Albums>All Photos, or tells the user to do that first?

  • by CRNew14,

    CRNew14 CRNew14 Aug 26, 2015 9:01 AM in response to Old Toad
    Level 1 (0 points)
    Aug 26, 2015 9:01 AM in response to Old Toad

    As stated in another post the script will work when run on pictures selected in Albums > All Photos.  While this is helpful it isn't entirely helpful for me.  Is there a way for the script to work within a particular Album?  I have several pictures perhaps from different times all in one album.  It's not feasible for me to select these pictures in Albums > All Photos to do the batch rename.  Instead it would make sense to select all within the album.

     

    Thank you all for the scripts.  Any way we can modify so it can be run in an album?  Thanks.

  • by Old Toad,

    Old Toad Old Toad Aug 26, 2015 9:27 AM in response to CRNew14
    Level 10 (140,881 points)
    Photos for Mac
    Aug 26, 2015 9:27 AM in response to CRNew14
Previous Page 2 of 3 last Next