• 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: Referring to the local hard drive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Referring to the local hard drive


  • Subject: Re: Referring to the local hard drive
  • From: Hans Haesler <email@hidden>
  • Date: Thu, 4 Jan 2001 09:08:06 +0100

On Wed, 03 Jan 2001, JollyRoger wrote:

>> set yourVariable to characters 1 thru -2 of (path to startup disk as text)
>> as text
>
>That works very well, and requires less time and steps. Good thinking! :)

... condition is that AppleScript's text item delimiters are {""}
When they are different, e.g. {":"}, then:

set diskName to characters 1 thru -2 of (path to startup disk as text) as text
-->"M:a:c:i:n:t:o:s:h: :H:D"

set diskName to text 1 thru -2 of (path to startup disk as text)
-->"Macintosh HD"

Using "text" instead of "characters" is shorter, faster and... immune
to text item delimiters which have not been restored to {""}.


Regards,

Hans

---
Hans Haesler | email@hidden


References: 
 >Re: Referring to the local hard drive (From: Joseph Briggs <email@hidden>)
 >Re: Referring to the local hard drive (From: JollyRoger <email@hidden>)

  • Prev by Date: Re: Referring to the local hard drive
  • Next by Date: Simple Question: Record List to value List
  • Previous by thread: Re: Referring to the local hard drive
  • Next by thread: Re: Referring to the local hard drive
  • Index(es):
    • Date
    • Thread