applescriptstring(
applescriptstring(
TEXT
)

The applescriptstring( function converts text into an AppleScript string literal.

Parameters

This function has one parameter:

text – the original text.

Description

This function converts text into an AppleScript string literal. To do this the function surrounds the text with double quote characters, and escapes any double quote and/or backslash characters within the text. Use this function when you need a string literal inside the applescript statement or applescript( function.

    applescriptstring({Make text into "applescript literal", including \ characters.})
        ☞ "Make text into \“applescript literal\“, including \\ characters."

Note: This function is equivalent to:

    {"}+replace(replace(thetext,{\},{\\}),{"},{"})+{"}

See Also

- applescriptconstant( -- converts an expression into an AppleScript literal.
- executeapplescript -- compiles and runs an AppleScript.
- Scripting Panorama X with AppleScript -- embedding Panorama code into AppleScript (allowing Panorama to be controlled from other programs).

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0.