O'Reilly logo

AppleScript® Programming for the Absolute Beginner by Jerry Lee Ford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with Strings

The ability to work with and manipulate strings is a critical skill for any AppleScript programmer. Many scriptable applications accept string arguments and return data in the form of strings. However, the strings you need to work with may not always be in the format you need them to be. For example, an application or command may return a result as a string. However, you may only need a portion of the string. AppleScript provides you with many ways of viewing and manipulating strings and their contents.

Storing Strings in Variables

In AppleScript a string is a series of characters enclosed within matching double quotation marks, as shown here:

"Sam"
"freedom"
"Once upon a time there was a big bad wolf."

Strings can be used ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required