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

Re: overrule space


  • Subject: Re: overrule space
  • From: "Adam K. Wuellner" <email@hidden>
  • Date: Wed, 12 Jan 2005 10:29:55 -0600

On Jan 12, 2005, at 10:14 AM, Bastiaan Boertien wrote:

If you open the Terminal and drag your folder into the Terminal window you will see the "/volumepath/TO\ SEND/". If you do with applescript "get POSIX path of alias volumename:TO SEND:" you will see in your results "/volumepath/TO SEND". you will have to put "\" before the space. "POSIX path of" will not do this for you in Applescript.

Right. That's why I asked for the _quoted_form_ of it. The quoted form won't insert backslashes before spaces, but it will wrap the text in single quotes, which is just as good as far as the shell is concerned.


In the shell, all of these are equivalent:

/volpath/to\ send/
"/volpath/to send/"
'/volpath/to send/'

The second form is inconvenient as it uses the same string delimiters (") as AppleScript.

The third form is automatically given to you by asking for the "quoted form" of some string, and as the string delimiter is different from what AppleScript uses, it can be easily concatenated with other strings.

The bit about getting the POSIX path of an alias was just thrown in the mix because I like the 'intelligence' your script gains from using aliases.

_______________________________________________
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: overrule space
      • From: "Adam K. Wuellner" <email@hidden>
References: 
 >overrule space (From: "Jan-Bultereys" <email@hidden>)
 >Re: overrule space (From: "Adam K. Wuellner" <email@hidden>)
 >Re: overrule space (From: Bastiaan Boertien <email@hidden>)

  • Prev by Date: Re: Pages program = unscriptable
  • Next by Date: Re: overrule space
  • Previous by thread: Re: overrule space
  • Next by thread: Re: overrule space
  • Index(es):
    • Date
    • Thread