• 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
Parent path. Senility?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parent path. Senility?


  • Subject: Parent path. Senility?
  • From: SemiColon <email@hidden>
  • Date: Sat, 2 Dec 2000 11:23:59 -0800

I must be getting senile, for I can't for the life of me get the
colons back in without a repeat loop. Emmm, a little help please?

on open (f)
set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
if (f as string)'s last text item is "" then --its a folder
set ItmsparentPath to text items 1 thru -3 of (f as string)
-->{"disk", "folder"}
else
set ItmsparentPath to text items 1 thru -2 of (f as string)
-->{"disk", "folder"}
end if
set AppleScript's text item delimiters to oldTID
end open

PS I know this will break if a disk is dropped. I'll fix that later.

;


  • Follow-Ups:
    • Re: Parent path. Senility?
      • From: Jolly Roger <email@hidden>
    • Re: Parent path. Senility?
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Month as Integer (or he's ranting again)
  • Next by Date: Re: Month as Integer (or he's ranting again)
  • Previous by thread: Re: Script not waiting for completion of Eudora task
  • Next by thread: Re: Parent path. Senility?
  • Index(es):
    • Date
    • Thread