MACSCRPT Archives

January 2011

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Delacour <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 20 Jan 2011 23:33:39 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (18 lines)
At 09:33 -0500 20/01/2011, Mark J. Reed wrote:


>To be fair, a TID-based solution is short and not what I would call inelegant:
>
>set text item delimiters to "."
>set bareName to text items 1 through -2 of theName as text

You will find it inelegant enough if you running it in the name space 
of an application that has no idea what it means, for example from 
the Scripts menu of a proper traditional Mac application.

I recommend that, in spite of its apparent verbosity, you _always_ use

AppleScript's text item delimiters

JD

ATOM RSS1 RSS2