• 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: Robert Poland <email@hidden>
  • Date: Fri, 16 Sep 2005 09:59:32 -0600

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

Thnaks Paul,

I caught the extra &. The escape key wouldn't work for some reason, now it does.

All I did was cut and paste from Martin Orpen's emailed answer.

Weird.
--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
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: Martin Orpen <email@hidden>
References: 
 >Re: """ (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: How to do some AppleScript inside a Perl program to label duplicates
  • Next by Date: Re: How to do some AppleScript inside a Perl program to label duplicates
  • Previous by thread: Re: """
  • Next by thread: Re: """
  • Index(es):
    • Date
    • Thread