Re: Get only the name of the file, instead of the whole path!
Re: Get only the name of the file, instead of the whole path!
- Subject: Re: Get only the name of the file, instead of the whole path!
- From: "Stockly, Ed" <email@hidden>
- Date: Thu, 17 Jan 2008 14:14:09 -0800
- Thread-topic: Get only the name of the file, instead of the whole path!
>>> From my point of vue, your soluce may be OK if you are the unique user of
your scripts.
> If you give or sell them to others they may give odd results because the user
may also use other scripts which assume that the TID are in their standard
status.
I don't believe a script writer should never assume that.
>>> I remember a period where I was fighting with a script and finally
discovered that a script sent by a more experienced scripter was coded as yours
>>(no, it was not one of yours).
Whew! :) Although I could have told you it wasn't mine, I never save them as
run only!
>> I finished to discover that the problem was just that when I called my
script the TID was not the standard one.
That could never happen to me, because whenever I use TID's I never assume
to know their value. If the script wants the default value, then I set them
to their default value.
The problem here is not that someone didn't reset the TIDs to their default
value, the problem was that you were using them without first setting their
value.
I never set them back to a default setting, but I also recommend this
construct inside handlers which may be called frequently:
--------
On DoMyStuff ()
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {","}
--do my stuff here
set AppleScript's text item delimiters to oldDelims
Return
End DoMyStuff
-----------
hth
ES
_______________________________________________
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