Hook to Roam Research - filenames with parentheses

Thanks both – I should have been more clear about my challenge.

My code successfully swaps out the parentheses for %28 and %29. I can confirm this with a display dialog statement just before return mypath

My problem is that Hook doesn’t use the modified URL; it seems to ignore the value returned by my Finder > Get Address script

I’m perplexed because I’ve made similar changes to the Safari > Get Address script, and that one works just fine