• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Li'l Help with my if, then, else statement?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Li'l Help with my if, then, else statement?
      • From: JollyRoger <email@hidden>
  • Prev by Date: Re: Cumulus Help!
  • Next by Date: Re: Text without formatting (OS 9.1)
  • Previous by thread: RE: Li'l Help with my if, then, else statement?
  • Next by thread: Re: Li'l Help with my if, then, else statement?
  • Index(es):
    • Date
    • Thread