Obtaining the currently selected items in Applescript

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
lyndondrake
Posts: 21
Joined: Sat Jul 04, 2015 3:36 am

Obtaining the currently selected items in Applescript

Post by lyndondrake » Tue Jun 04, 2019 7:34 am

Hi,

I've just tried this in Applescript:

Code: Select all

tell application "Bookends"
	tell front library window
		set theRefs to selected publication items
as a way to obtain the currently selected publication items. theRefs ends up being a list with the same number of items as I have currently selected in the front library window, but the items in the list are different items from the ones I've selected. I can't see any pattern to which items come through.

Is there another way to obtain the selected items?

Jon
Site Admin
Posts: 8201
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Obtaining the currently selected items in Applescript

Post by Jon » Tue Jun 04, 2019 8:36 am

There's another thread on this somewhere -- it was fixed by Rebuilding the library.

Jon
Sonny Software

lyndondrake
Posts: 21
Joined: Sat Jul 04, 2015 3:36 am

Re: Obtaining the currently selected items in Applescript

Post by lyndondrake » Tue Jun 04, 2019 4:48 pm

Cool, that fixed it. (Though is that something I'll have to do regularly in Bookends?)

Jon
Site Admin
Posts: 8201
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Obtaining the currently selected items in Applescript

Post by Jon » Tue Jun 04, 2019 4:56 pm

I have no way of knowing.

Jon
Sonny Software

Jon
Site Admin
Posts: 8201
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Obtaining the currently selected items in Applescript

Post by Jon » Wed Jun 05, 2019 1:25 pm

We've isolated the problem and it's fixed in the next update.

Jon
Sonny Software

lyndondrake
Posts: 21
Joined: Sat Jul 04, 2015 3:36 am

Re: Obtaining the currently selected items in Applescript

Post by lyndondrake » Thu Jun 06, 2019 1:47 pm

Thank you!

Post Reply