I have a collection of PDFs stored in a directory in iCloud and I need to retrieve the link for them from within Finder. I am attempting to use AppleScript and referencing this post and some other ideas from the web, I am trying to use the following, but it fails with "Can't make alias":
tell application "Finder"
set sourceFolder to target of front window as alias
display dialog sourceFolder
end tell
My intent is to embed the PDF in a Markdown file using the full filesystem path syntax, e.g. ![[file:///path/to/file.pdf]]
. What would be a good way to approach this?