Re: Finding and shelling out to a sh script in the same directory as the AppleScript
Re: Finding and shelling out to a sh script in the same directory as the AppleScript
- Subject: Re: Finding and shelling out to a sh script in the same directory as the AppleScript
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 5 Feb 2009 12:29:33 -0500
If you're going to have to do text manipulation on a pathname, I don't
see anything to recommend the POSIX version over the HFS version. The
latter is both shorter and, to me anyway, clearer.
It's just the fact that such antics are necessary for so
straightforward an operation which seems strange to me. If you have
an object representing a file, then there should be a property of that
object, or a method or command you can call on it, to return its
containing folder. And there is, if you're using the Finder (and
probably System Events, too, maybe?), but it feels basic enough to be
part of the vanilla AS dictionary.
I'm not decrying AppleScript for the lack, incidentally, nor am I
claiming that things are any better in shell land. After all, the
dirname(1) command is nothing but a conveniently prepackaged text
manipulation operation. But I have different underlying assumptions
there since everything in POSIX is designed around the idea that files
are identified by plain text strings, and there's no sort of
structured object representation analogous to the AS "alias" on which
to hang this sort of behavior.
On Thu, Feb 5, 2009 at 12:09 PM, Skeeve <email@hidden> wrote:
> Skeeve schrieb:
>>
>> depends.
>> 1) You need not depend on ":" being the path delimiter
>>
> OTOH: You (I) depend on / being the delimiter and .. being parent.
>
> But the other advantages are valid, aren't they?
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden