Re: Li'l Help with my if, then, else statement?
Re: Li'l Help with my if, then, else statement?
- Subject: Re: Li'l Help with my if, then, else statement?
- From: Cal <email@hidden>
- Date: Fri, 2 Mar 2001 02:04:11 -0500
Jolly Roger <email@hidden> wrote:
T.J. Mahaffey (email@hidden) wrote:
Can someone tell me why this isn't following the if, then statement
properly?
The setup works beautifully, but if the "Utilities" folder IS present, it
still tries to make on and errors out due to there being a folder of the
same name already.
Guidance is very much appreciated.
Hi TJ,
First, your script will be much easier to follow if you used paths like:
file "MacLab NetAssist Setup:Remote Control Setup:Network Assistant
Preferences"
instead of this:
file "Network Assistant Preferences" of folder "Remote Control Setup" of
disk "MacLab NetAssist Setup"
I heartedly disagree, Roger. These are perfectly good Finder object
specifiers, and are what is obtained when recording the Finder. Not
everyone is comfortable with colon-delimited path notations, and I
presume that the original poster may have attempted to maintain an
English-like style.
I see no program with his original specifiers, and I encourage new
scripters to use the long forms.
The only problem with his script is that he didn't specify where the
folder was:
if folder "Utilities" of startup disk exsits then
or
if folder "Utilities" of desktop exists then
or
if folder "Utilities" of disk "<disk-name>" then
(depending on where the folder is)
Respectfully,
Cal