• 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
Re: """
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: """


  • Subject: Re: """
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 16 Sep 2005 08:40:38 -0700
  • Thread-topic: """

On 9/16/05 8:26 AM, "Robert Poland" <email@hidden> wrote:

>
> I'm trying to use a quote in a string as in this example;
> display dialog "Ok to save? " & """ & newName & """ & buttons
> {"OK", "No"} default button 1 cancel button 2
>
> I assume I need to escape the enclosed quote, but neither the "\" or
> "<escape key>" seem to be the answer.
> I have plowed around all over the Help from "Smile" with not results.
> Matt's book doesn't seem to help me either.
>
> Any suggestions?

Just try a little harder.  Assuming newName is previously defined, e.g.

    set newName to "foo"
    display dialog "Ok to save? \"" & newName & "\"" buttons {"OK", "No"}
default button 1 cancel button 2 -- one line


In particular, don't put a '&' before 'buttons'.

Why would you expect there to be anything in Matt's book, or Smile's Help,
other than telling you that you need an \ to escape literal " quote
characters within strings? The rest is up to you to think logically and
check for errors.

--
Paul Berkowitz


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: """
      • From: Robert Poland <email@hidden>
References: 
 >""" (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Using selective color command/ any decent Photoshop Applecripts guidebooks out there?
  • Next by Date: Re: How to do some AppleScript inside a Perl program to label duplicates
  • Previous by thread: Re: Font info from Applescript
  • Next by thread: Re: """
  • Index(es):
    • Date
    • Thread