• 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: Referencing a folder with "~" in the name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Referencing a folder with "~" in the name


  • Subject: Re: Referencing a folder with "~" in the name
  • From: Simon Forster <email@hidden>
  • Date: Tue, 23 Apr 2002 13:41:34 +0100
  • Resent-date: Tue, 23 Apr 2002 13:42:45 +0100
  • Resent-from: Simon Forster <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: Applescript List <email@hidden>

On Tuesday, April 23, 2002, at 01:14 PM, Simon Forster wrote:

How can I reference "folder "remoteMountedDisk:folderName:folderName:~restOfFolderName""? The usual suspects of escaping the tilde or saying (ascii character 126) don't work.

OK, not 100% sure what's going on here but it seems that I can reference something with a tilde in it. Rather, the problem was one I've experienced elsewhere where folder ("string" & "string" & "string") does not seem to be cast to a string unless one does so explicitly. In fact it's not quite that simple but the behaviour does vary between OS 9 and OS X.

More specifically:

property my_web_server : {volume:"Oxford"}

tell application "Finder" to select folder (volume of my_web_server & ":" & "yadda")

seems to fail on OS 10.1.4 (and 10.1.3). However, if I explicitly cast the chunk in brackets to a string (volume of my_web_server & ":" & "yadda" as string) it works fine. I guess that "volume of my_web_server" doesn't return a string in OS X (while it seems to in OS 9) so the explicit casting is a requirement.

ATB

Simon Forster
________________________________________________
LDML Ltd, 4/5 Hazlitt Mews, London, W14 0JZ, UK
<tel int="+44 20 7602 9370" uk="020 7602 9370">
<fax int="+44 20 7371 6662" uk="020 7371 6662">
<mailto:email@hidden>
________________________________________________
_______________________________________________
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.

  • Prev by Date: Scripting non-scriptable apps
  • Next by Date: ASLG page 326 - Script Objects
  • Previous by thread: Re: Referencing a folder with "~" in the name
  • Next by thread: Re: Referencing a folder with "~" in the name
  • Index(es):
    • Date
    • Thread