Skip to content
Advertisement

Tag: applescript

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. Answer I’d use ‘Listing 32-7 AppleScriptObjC: Handler that URL encodes text’ from Encoding and Decoding Text.

Open XML file in AppleScript with JavaScript syntax

I am writing my first bigger AppleScript and as I am usually developing TypeScript, I decided to use the JavaScript version of AppleScript. I need to read and parse an XML file. Apple has an Example for that on their documentation, however the documentation only has an example in the AppleScript syntax, not in the JavaScript syntax: https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/WorkwithXML.html#//apple_ref/doc/uid/TP40016239-CH67-SW1 How do

Advertisement