Skip to content
Advertisement

AppleScript Hash Symbol (#) in URL

I have this Automator AppleScript to translate texts. It works, but only with one word. If I select two words or more to translate, it changes the hash (#) in the URL to %23, like this

https://www.deepl.com/translator%23pt/en/

and I get a 404 Not Found.

JavaScript

Advertisement

Answer

I’d use ‘Listing 32-7 AppleScriptObjC: Handler that URL encodes text’ from Encoding and Decoding Text.

Example AppleScript code:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement