A question about Applescript
Posted: Wed Aug 18, 2021 6:22 am
I was trying to simplify the process of copying "Title", "Author" and "date" from the Pdf files in Bookends to the reference.
It is very hectic process to copy each of these items and past into the menu, one by one.
(Google scholar is not working for me).
So, what I want to do is to copy all the three items, and insert them once.
the idea was to use KM to collect all the 3 clipboards into a single clipboard; and then, split that last clipboard into items.
the following KM script correctly concatenates all the clipboards (which bear the Title, Author and Year) into a single clipboard to be used in Apple script.

https://take.ms/P3FHG
Now, the problem is, the AppleScript is packaging all these items into one. I am unable to get the clipboard as a proper list.
This one picks out the words, not the comma separated items.
Is there an easy way to pick up the Title, author and Year as separate items in Applescript?
It is very hectic process to copy each of these items and past into the menu, one by one.
(Google scholar is not working for me).
So, what I want to do is to copy all the three items, and insert them once.
Code: Select all
tell application "Bookends"
tell the front library window
set myRefs to selected publication items
set myItem to first item of myRefs
set myData to (the clipboard as list)
set title of myItem to item 1 of myData
set authors of myItem to item 2 of myData
set date of myItem to item 3 of myData
end tell
end tell
the following KM script correctly concatenates all the clipboards (which bear the Title, Author and Year) into a single clipboard to be used in Apple script.
https://take.ms/P3FHG
Now, the problem is, the AppleScript is packaging all these items into one. I am unable to get the clipboard as a proper list.
Code: Select all
set MyData to (the clipboard as list)
This one picks out the words, not the comma separated items.
Is there an easy way to pick up the Title, author and Year as separate items in Applescript?