Skip to content
FLAVIO COPES
flaviocopes.com
2026

How to concatenate strings in AppleScript

By Flavio Copes

Learn how to concatenate strings in AppleScript using the & operator instead of the + you might expect from JavaScript, Swift, or Python.

~~~

I’m used to using the + operator to concatenate strings in JavaScript, Swift, Python and other languages.

So I tried that in AppleScript but it didn’t work.

In AppleScript you use the & operator:

set example to "hello"
"testing " & example

macOS Script Editor app showing AppleScript code with string concatenation using the ampersand operator

☝️ is the macOS built-in Script Editor app, the best way I found to tinker with AppleScript.

Tagged: Mac · All topics
~~~

Related posts about mac: