Tuesday, January 17, 2017

#1 2005-10-13 04:01:45 pm

julifos
Administrator
From: MalasaƱa, Madrid
Registered: 2002-11-20
Posts: 2014

How can I create a string containing a quote or a backslash?

Quotes and backslashes are control characters in AppleScript.  Therefore, you'll need to escape these characters with preceeding backslashes when you write your code.  For example...

Applescript:

set theString to "\"This is a sentence wraped in quotes.\""
--> "This is a sentence wraped in quotes."

set theString to "This is a sentence containing a backslash (\\)."
--> This is a sentence containing a backslash (\).

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.029 seconds, 8 queries executed ]

RSS (new topics) RSS (active topics)