I\'m writing an AppleScript that I\'m going to run in a macOS app. This script works fine in Script Editor but when I bring it into Xcode and try to run it, encoding a URL f