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

Re: Strange path


  • Subject: Re: Strange path
  • From: Nigel Garvey <email@hidden>
  • Date: Wed, 21 Jul 2004 20:33:50 +0100

John Azevedo wrote on Wed, 21 Jul 2004 10:59:41 -0400:

>Why am I getting the following result?
>
>set x to path to preferences
>set y to x & "foo" as text
>
>Result: "OS X:Users:zoff:Library:Preferences:/foo"

You probably have AppleScript's text item delimiters set to "/". As Paul
says, concatenating a string to an alias produces a list. The oblique
stroke would be introduced if you had the TID's set to that when you
coerced the list to string. The default setting for TID's is {""}.

>My current workaround is This:
>
>set x to POSIX path of (path to preferences)
>set y to x & "foo" as text
>
>Result: "/Users/zoff/Library/Preferences/foo"

That's not so much a "workaround" as a way of getting a POSIX path. :-)

NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Strange path
      • From: John Stewart <email@hidden>
  • Prev by Date: XML-RPC structs and case-sensitivity
  • Next by Date: Re: Strange path
  • Previous by thread: Re: Strange path
  • Next by thread: Re: Strange path
  • Index(es):
    • Date
    • Thread