• 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: Path to ... as string [was Re: Complete newbie]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path to ... as string [was Re: Complete newbie]


  • Subject: Re: Path to ... as string [was Re: Complete newbie]
  • From: Federico <email@hidden>
  • Date: Sat, 26 Apr 2003 11:17:29 +0200

Sabato, 26 apr 2003, alle 04:06 Europe/Rome, Paul Berkowitz ha scritto:

I think Emmanuel meant that the English folder names "Users" and "Documents"
won't work on non-English machines. I you were writing for your own machine,
you'd just substitute the correct terms there.

A quick note about non-English machines... Mine is an "italian machines" (I choose italian as first language on "International" preference pane), so, when I browse my disk with the Finder I see "Utenti" instead of "Users", "Libreria" instead of "Library" (this should have been translated as "Biblioteca" :)), "Documenti" instead of "Documents", etc.

But that's just the Finder translating folders names. This translation works only in Jaguar and only if the folder contains a ".localized" file, and the "Always show file extension" Finder preference is off.

The real folder name (e.g. the one i must use with shell applications) is still "Documents", not "Documenti".

So the script:

(path to "boot" as string) & "Users:username:Documents:"

Works on my machine (if I change 'username' with the real one), and I believe will work on other non english machines but this:

(path to "boot" as string) & "Utenti:username:Documenti:"

does *not* work since really there is no folder called "Utenti" (nor "Documenti") on my disk.

The Finder instead will have no problem with localized folder names:

folder "Documenti" of home

Will return:

folder "Documents" of folder "federico" of folder "Users" of startup disk of application "Finder"

However, I think using 'path to "docs"' is still better, if the script will be used by more than one user, since the user name is not hardcoded. Also, a user could have moved its home folder to another location.

--
Federico
_______________________________________________
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: Path to ... as string [was Re: Complete newbie]
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Path to ... as string [was Re: Complete newbie] (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Path to ... as string
  • Next by Date: Re: Path to ... as string
  • Previous by thread: Re: Path to ... as string
  • Next by thread: Re: Path to ... as string [was Re: Complete newbie]
  • Index(es):
    • Date
    • Thread