Resurrecting this old thread as it got lost in my inbox (sigh).

This latest script from Chris Stone (thanks Chris!) does 90% of what I’m 
looking for but since I’m an Applescript idiot, I’m looking for a little more 
assistance:

1. How can this script be modified to enclose the URLs with “<“ and “>” so that 
they are markdown links?

2. How can this script be modified to work for items selected in Finder or in 
Path Finder?

For reference, I saved a version of this script as an application and then 
assigned it a keyboard shortcut via Keyboard Maestro (which brings up another 
stupid question which is how to find all unused keyboard shortcuts?).

Thanks,

Craig


> On Jan 15, 2022, at 6:45 PM, Christopher Stone <[email protected]> 
> wrote:
> 
>> On Jan 12, 2022, at 11:50, jj <[email protected] <mailto:[email protected]>> 
>> wrote:
>> An easy way to get the URI of a document from the finder on macOS Monterey:
> 
> 
> This is easy enough to automate...
> 
> -Chris
> 
> --------------------------------------------------------
> # Auth: Christopher Stone
> # dCre: 2022/01/15 18:42
> # dMod: 2022/01/15 18:42 
> # Appl: Finder
> # Task: Get File-URLs of Selected Items in the Front Finder Window.
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @Finder, @File-URLs, @Selected, @Items
> --------------------------------------------------------
> 
> tell application "Finder"
>     set finderSelectionList to selection as alias list
>     if length of finderSelectionList = 0 then error "No files were selected 
> in the Finder!"
>     set theItem to item 1 of finderSelectionList
>     
>     repeat with i in finderSelectionList
>         set contents of i to URL of i
>     end repeat
>     
> end tell
> 
> set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text item 
> delimiters, {""}}
> set the clipboard to finderSelectionList as text
> set AppleScript's text item delimiters to oldTIDS
> 
> --------------------------------------------------------
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "[email protected]" 
> rather than posting here. Follow @bbedit on Twitter: 
> <https://twitter.com/bbedit <https://twitter.com/bbedit>>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/72F5A4AF-6549-4E7E-A5AF-8961D4803B28%40gmail.com
>  
> <https://groups.google.com/d/msgid/bbedit/72F5A4AF-6549-4E7E-A5AF-8961D4803B28%40gmail.com?utm_medium=email&utm_source=footer>.

--
Craig Heilman
Bugaboo Software



-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/DDD78ECF-74C2-4FB3-B977-90D28393D2A7%40bugsoft.com.

Reply via email to