Page 1 of 1

Feature Request: Additional AppleScript commands

Posted: Tue Jul 13, 2021 11:33 am
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).

Re: Feature Request: Additional AppleScript commands

Posted: Tue Jul 13, 2021 12:06 pm
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