NicFletcher

Q: A sample AppleScript and some technical observations on Photos

Hi,

 

While I've had my own fair share of issues with Photos, I'm overall very happy with it. But I have noticed some quirks, so I thought I'd share them and also share an AppleScript I wrote to help out on some other discussions.

 

  1. Don't add a KeyWord to more than 1,000 photos at a time as a precaution. Photos crashed when I tried a huge huge number! And it didn't recover, so good job I use Time Machine religiously.
    1. I've found KeyWord updates in chunks of around 750 to be the best optimum

  2. Talking of Time Machine, I'd noticed that it doesn't backup the database files. I was going to try and research this, but when I lost 80% of my library (see point 1 above), it restored just fine.
    1. After restoring, and starting Photos, it displays a message knowing it has been restored, and does some re-building of the database. But it was a perfect copy. So, kudos to Apple for at least not losing me my library!
    2. On the two occasions in my life I have had to restore (one with iPhoto and the recent one with Photos), I find that the restore in Time Machine takes forever. So, I heartedly recommend this tip to use terminal to restore the library. With a USB3 hard drive, I restored an 85 GB library in around 25 minutes.  Stack Exchange
  3. Smart Albums are not visible to AppleScript

  4. When changing or adding a title to an item in Photos, the change is not written to the database until you close Photos. Might be a good idea to close and reopen often if you are doing this much.

  5. I got loads of duplicates when I converted my iPhoto Library. It was a combination of a sync problem I had with PhotoStream and thousands of Zombie files that were hidden in my iPhoto package and imported into Photos during the conversion.

  6. I've been playing with AppleScript to help me tidy up my library. I wrote one script for another discussion, but I share it here, because it will give those that use AppleScript as an amateur (like myself) some clues on how to get a media item and do something with it.
    1. The documentation says that you can also process moments, but I haven't got that far yet!

 

I'll share the script and link in a separate post to make it easier to read!

MacBook Air, OS X Yosemite (10.10.3)

Posted on Apr 17, 2015 5:15 AM

Close

Q: A sample AppleScript and some technical observations on Photos

  • All replies
  • Helpful answers

first Previous Page 3 of 3
  • by Pizzamiglio,

    Pizzamiglio Pizzamiglio Aug 8, 2015 10:04 AM in response to NicFletcher
    Level 1 (0 points)
    Aug 8, 2015 10:04 AM in response to NicFletcher

    Hi NicFletcher,

     

    I have downloaded your original "Photos Filename to Title V1.2.scpt" and don't know how to add it to Photos.  Can you point me to the right direction to accomplish that?

     

    Thank you very much,

  • by Bob221b1,

    Bob221b1 Bob221b1 Sep 2, 2015 6:14 PM in response to NicFletcher
    Level 1 (10 points)
    Apple TV
    Sep 2, 2015 6:14 PM in response to NicFletcher

    Hello Nick,

     

    Where can I find your script to batch-rename titles from Photos?

     

    Thank you,

    Bob

  • by LarryHN,

    LarryHN LarryHN Sep 2, 2015 9:31 PM in response to Bob221b1
    Level 10 (84,027 points)
    Photos for Mac
    Sep 2, 2015 9:31 PM in response to Bob221b1
  • by Bob221b1,

    Bob221b1 Bob221b1 Sep 2, 2015 9:37 PM in response to LarryHN
    Level 1 (10 points)
    Apple TV
    Sep 2, 2015 9:37 PM in response to LarryHN

    Hi Larry,

     

    I wrote to him because I couldn't find it in the opening page of photos that you listed.

     

    Can you be more specific about the exact date time stamp of the entry I want to look at ?

    thank you.

  • by remyx1,

    remyx1 remyx1 Dec 25, 2015 8:21 AM in response to NicFletcher
    Level 1 (0 points)
    Dec 25, 2015 8:21 AM in response to NicFletcher

    Hi, Script noob here. I tried a few of the scripts, and the app, and all don't seem to want to start. I tried selecting individual or groups of images, iphoto events (in photos), albums, nothing seems to matter. What do I need to do/select before I launch the service, or after?

     

    For the dropbox long version, I get the welcome splash screen (This script will search for media items missing...) then: Album or Folder doesn't exist - exiting.

     

    For the App, I got: Photos got an error: AppleEvent handler failed. (-10000)

    Thanks.

  • by Steve Drenker,

    Steve Drenker Steve Drenker Jan 13, 2016 10:00 AM in response to NicFletcher
    Level 1 (25 points)
    Jan 13, 2016 10:00 AM in response to NicFletcher

    Nic, thanks for your "Photos bug: If a title or keyword is deleted, Photos till thinks one exists!"

     

    Same problem exists with Description, not just Title and Keyword. It took me a while to debug this -- very frustrating.

  • by tedster998,

    tedster998 tedster998 Feb 13, 2016 12:17 PM in response to NicFletcher
    Level 1 (22 points)
    Feb 13, 2016 12:17 PM in response to NicFletcher

    Hi Nic,

    Your "Photos Filename to Title V1.3.scpt" is awesome!

    I found after migrating from iPhoto to Photos that I had over 2,800 photos without titles. All of my photos now have titles after running your script. And it only took minutes! You saved me from spending countless hours creating titles from file names or abandoning Photos altogether.

    Thank you very much!! I greatly appreciate it.

  • by florence j,

    florence j florence j Aug 11, 2016 8:25 PM in response to NicFletcher
    Level 1 (4 points)
    Aug 11, 2016 8:25 PM in response to NicFletcher

    I am a 66 years old photographer and just move my large Aperture library to Photos . My pictures were named :  my name_date_number .  I have now imported some pictures in Photo and cannot find a way to do the same.

     

    I just cannot believe than in 2016 , I  have to write a script to be able to do that . Really !!  I have been using Apple for many years but this is really non sense. So frustrated !! This application should not have been released as it is ! I understand that  you are trying to help : Apple should hire all of you !!

     

    Thanks Florence jean MBA, Inf

first Previous Page 3 of 3