Re: Scripting is for lazy people.
Re: Scripting is for lazy people.
- Subject: Re: Scripting is for lazy people.
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 10 Sep 2001 18:21:02 -0700
On 9/9/01 7:36 PM, "Rachel Cogent" <email@hidden> wrote:
>
Two questions:
>
1: How do I reduce these 2 lines to 1?
>
>
set doFile to name of file bar of foo
>
set insertName to text 4 thru 5 of doFile
>
Not sure why you'd want to. It reads very well as it is, assuming it's
actually in a Finder tell block.
tell application "Finder
set insertName to text 4 thru 5 of (get name of file "bar" of folder
"foo" of startup disk)
end tell
Or use the alias nomenclature: alias "My HD:foo:bar"
In some applications you have to use the explicit 'get' or else set to a
variable in order to evaluate a property of an element to something that ca
be further used.
>
>
2: Why do I spend 6 hours doing something with a script when I could have
>
done it the hard way in 45 minutes?
>
Hint: Don't say it's because I'm lazy!
>
You like solving puzzles.
--
Paul Berkowitz