• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scriplting the Photos application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scriplting the Photos application


  • Subject: Re: Scriplting the Photos application
  • From: 2551 <email@hidden>
  • Date: Mon, 20 Apr 2015 11:38:29 +0700


On 20 Apr 2015, at 11:28, 2551 <email@hidden> wrote:
and I got 3 different kinds of replies. 

Make that 4. After between 4 and six times of the script failing on the first item, it'll give me on partial success, returning the properties of the first item but failing on the second. After that it'll go back to failing on the first item again for a few runs. I can repepat this fairly reliably.

So, mostly I get this:

tell application "Photos"
count every selection of current application
--> 2
get selection
--> {media item id "8tn%t6PeQea3qtn%nHLB7g", media item id "eodXL5x1SZ+duHSYbCb9tg"}
get properties of media item id "8tn%t6PeQea3qtn%nHLB7g"
--> error number -10000

Result:

error "Photos got an error: AppleEvent handler failed." number -10000


But on every nth run (n varies somewhere between 4 and 6), I get:


tell application "Photos"
count every selection of current application
--> 2
get selection
--> {media item id "8tn%t6PeQea3qtn%nHLB7g", media item id "eodXL5x1SZ+duHSYbCb9tg"}
get properties of media item id "8tn%t6PeQea3qtn%nHLB7g"
--> {favorite:false, id:"8tn%t6PeQea3qtn%nHLB7g", class:media item, filename:"2012-08-14 16.06.28.jpg", width:1552, location:{missing value, missing value}, keywords:missing value, date:date "Tuesday, 14 August 2012 16:06:28", height:2592, description:missing value, altitude:missing value, name:"Shanes script-2"}
get selection
--> {media item id "8tn%t6PeQea3qtn%nHLB7g", media item id "eodXL5x1SZ+duHSYbCb9tg"}
get properties of media item id "eodXL5x1SZ+duHSYbCb9tg"
--> error number -10000

Result:

error "Photos got an error: AppleEvent handler failed." number -10000



Best

Phil

DisplayDroid beta (a lightweight script editor and automation tool) is now available for free download. More info on sqwarq.com/displaydroid
OSXClock - big, beautiful alarm clock and timer for your mac. More info on sqwarq.com/osxclock

http://applehelpwriter.com
http://sqwarq.com - apps for OS X & iOS










 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Scriplting the Photos application (From: Bill Cheeseman <email@hidden>)
 >Re: Scriplting the Photos application (From: Shane Stanley <email@hidden>)
 >Re: Scriplting the Photos application (From: Bill Cheeseman <email@hidden>)
 >Re: Scriplting the Photos application (From: 2551 <email@hidden>)
 >Re: Scriplting the Photos application (From: Shane Stanley <email@hidden>)
 >Re: Scriplting the Photos application (From: Bill Cheeseman <email@hidden>)
 >Re: Scriplting the Photos application (From: Shane Stanley <email@hidden>)
 >Re: Scriplting the Photos application (From: 2551 <email@hidden>)
 >Re: Scriplting the Photos application (From: 2551 <email@hidden>)
 >Re: Scriplting the Photos application (From: Bill Cheeseman <email@hidden>)
 >Re: Scriplting the Photos application (From: Bill Cheeseman <email@hidden>)
 >Re: Scriplting the Photos application (From: 2551 <email@hidden>)
 >Re: Scriplting the Photos application (From: Bill Cheeseman <email@hidden>)
 >Re: Scriplting the Photos application (From: Shane Stanley <email@hidden>)
 >Re: Scriplting the Photos application (From: Axel Luttgens <email@hidden>)
 >Re: Scriplting the Photos application (From: 2551 <email@hidden>)

  • Prev by Date: Re: Scriplting the Photos application
  • Next by Date: Re: Scriplting the Photos application
  • Previous by thread: Re: Scriplting the Photos application
  • Next by thread: Re: Scriplting the Photos application
  • Index(es):
    • Date
    • Thread