I have an Apple M1 on Sequoia 15.5 and am using Shortcuts 7.0 to automate using Hookmark to copy and format text and present a markdown link.
This roughly looks like:
- Get bookmark from active window
- If it’s an actual bookmark (isBookmark = 1), then
- grab the url and title from the bookmark
- copy selected text (if any)
- Use regex to format the title and text
- Present a markdown link text - title
The issue is that Get Bookmark from Active Window doesn’t seem to provide a usable bookmark with the expected fields. My workaround (pictured below) is to copy a link to the clipboard from the bookmark then retrieve it again.
However, it turns out that having to pre-populate the clipboard like this messes up my automation in the case that I don’t select text in Skim PDF but still want to format the title (because Skim doesn’t allow Cmd+c if no text is selected, unlike Safari). Otherwise, it works fine in Safari and in Skim with text selected.
How is Get bookmark from active window supposed to work? If I choose to Focus on the bookmark it creates, it does what I expect, but I can’t seem to access title/url in any way other than exploiting the clipboard.