Feature Request: Additional AppleScript commands

Users asking other users for AppleScripts that work with Bookends.
Post Reply
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Feature Request: Additional AppleScript commands

Post by DrJJWMac »

I would like to have further command options in AppleScript. One case is to be able to rename an attachment.

Code: Select all

rename the second attachment item of the publication item as "This Is the Second One.pdf"
rename the first attachment item of the publication item using format "My Renaming Format"
This requires two new options

* RENAME -- rename an attachment item
* USING FORMAT -- the format to use in renaming

We'd also benefit by access to get the list of names of formats, also restricted to only the active ones

Code: Select all

set theFullFormatList to the full format list
set theActiveFormatList to the active format list
Having these additional features in the AppleScript dictionary for Bookends, along with having access to set/get the library attachment folder, would significantly simplify the ability to create an AppleScript package for a user to a) select an attachment folder for a library, b) select a naming convention using a format created in Bookends, and c) move/copy attachments to the defined attachment folder with renaming using a predefined renaming convention.

These additions would offer the ability to create an attachment management script package that would not require the user to know AppleScript coding (to change internal property values in the code itself).
--
JJW
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Feature Request: Additional AppleScript commands

Post by Jon »

AS dictionaries provide low-level access to fundamental functions. AS is a scripting language that lets you assemble these events into a useful series of steps.

You can rename an attachment right now -- get the attachments field, remove the attachment name you no longer want, and then add the attachment name you do want.

Similarly, you know that all formats are located, whether active or not, in /Users/username/Library/Application Support/Formats (formats that have been created or modified by the user are in the folder Custom Formats). You can use AS to ask the Finder to return the names of all formats and then select whichever one you want.

Jon
Sonny Software
Post Reply