Skip to content

Instantly share code, notes, and snippets.

@mingsai
Last active May 28, 2020 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mingsai/87f52f02423b308cb1e84c470ff6cf36 to your computer and use it in GitHub Desktop.
Save mingsai/87f52f02423b308cb1e84c470ff6cf36 to your computer and use it in GitHub Desktop.
Applescript - Escaping double quotes around variable text
set myString to "This is a \"quoted\" text."
Sample usgage:
on run {input, parameters}
set filename to item 1 of input
set desc to "\"" & item 2 of input & "\""
--display dialog filename & desc
(* Your script goes here *)
do shell script "/usr/local/bin/gist -P -f " & filename & " -e -d " & desc
--return input
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment