Re: Referring to the local hard drive
Re: Referring to the local hard drive
- Subject: Re: Referring to the local hard drive
- From: "Pre Press Services" <email@hidden>
- Date: Thu, 4 Jan 2001 12:10:32 -0700
>
... 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
Ahhhh! I was testing a script a while back and kept getting just what you
show in the first example with a ":" in between each letter. I had no idea
what was going on. Now I understand that I was setting the text item
delimiter to ":" then asking for characters and getting the mess described
above. Thanks!
----
Joseph Briggs < email@hidden >
< email@hidden >