• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
preserving literal text in AppleScripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

preserving literal text in AppleScripts


  • Subject: preserving literal text in AppleScripts
  • From: Cameron Hayne <email@hidden>
  • Date: Fri, 15 Dec 2006 17:41:39 -0500

Is there any good way of preserving literal text that is embedded in an AppleScript?
What I'm looking for is something analogous to the "here documents" of Perl or Bash where I can define a variable to have the contents of the following text - from this delimiter up to a terminating delimiter - where AppleScript will make absolutely no changes and no interpretation of the text whatsoever.
In particular, I want to be able to use quotes and backslashes, etc in this text and not have to escape those quotes (with backslashes).


The context of this is for text that is code to be passed to 'do shell script'. I'd like to have a good (nice) way of embedding arbitrarily complicated Bash or Perl scripts inside an AppleScript. I don't want to have to manually insert backslashes in this code where needed to preserve it from interpretation by AppleScript.

--
Cameron Hayne
email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: preserving literal text in AppleScripts
      • From: Emmanuel <email@hidden>
    • Re: preserving literal text in AppleScripts
      • From: "Mark J. Reed" <email@hidden>
    • Re: preserving literal text in AppleScripts
      • From: david okner <email@hidden>
  • Prev by Date: Re: Preserve the resource files
  • Next by Date: Re: preserving literal text in AppleScripts
  • Previous by thread: Re: AppleScript-Users Digest, Vol 3, Issue 634 (Holidays)
  • Next by thread: Re: preserving literal text in AppleScripts
  • Index(es):
    • Date
    • Thread