list of authors

Users asking other users for AppleScripts that work with Bookends.
Post Reply
pereelmagne
Posts: 1
Joined: Sun Apr 21, 2019 5:26 am

list of authors

Post by pereelmagne »

Hello,

I'm trying to get a list of author names from a group. The script doesn't work. What I have is the following:

tell application "Bookends"
tell front library window
set nameList to author names of every publication item of group item id "calligrafia"
set myList to {}
copy nameList to end of myList
get myList
end tell
display dialog myList
end tell

What I get is a series of lists, one for every captured name. What can I do?

Tanks in advance.
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: list of authors

Post by Jon »

I'm far from an AS expert and you'll get better answers from others. But here's my take on what you want, giving you a return-delimited list of names. Note that you can have duplicate names, it's up to you to handle that. And this script could be shortened (no need for finalList), but I left your code in place.

tell application "Bookends"
tell front library window
set nameList to author names of every publication item of group item id "calligrafia"
set myList to {}
copy nameList to myList
set AppleScript's text item delimiters to ASCII character 10
set finalList to myList as string
end tell
display dialog finalList
end tell

Jon
Sonny Software
Post Reply