Re: Does it presume too much [was Parent path]
Re: Does it presume too much [was Parent path]
- Subject: Re: Does it presume too much [was Parent path]
- From: SemiColon <email@hidden>
- Date: Sat, 2 Dec 2000 19:58:13 -0800
The routine works fine, Am I making too much of a presumption with
the "on error?"
;
on extractParentPath(f)
set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
if (f as string)'s last text item is "" then
try
set ItmsparentPath to "" & text items 1 thru -3 of (f as string) & ":"
beep
on error
set ItmsparentPath to f as string
end try
else
set ItmsparentPath to "" & text items 1 thru -2 of (f as string) & ":"
beep 3
end if
set AppleScript's text item delimiters to oldTID
return ItmsparentPath
end extractParentPath