• 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: Multiple IF conditions in one line & path to Users Library
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple IF conditions in one line & path to Users Library


  • Subject: Re: Multiple IF conditions in one line & path to Users Library
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 13 Dec 2005 23:21:36 -0800


On Dec 13, 2005, at 10:44 PM, Brett Conlon wrote:

Is there a way to include 3 condition statements in one if line?

The below is my best attempt but it ain't workin'. If any one of the files are in the correct location it returns "All files there":

if not (exists file FHPSA4) and not (exists file FHPSA3) and not (exists file FHPSCus) then
display dialog "Files Missing"
... do the moving stuff
else
display dialog "All files there"
... don't do anything

Yes, because that's what you asked it to do. It goes into the "files missing" branch only if FHPSA4 doesn't exist *and* FHPSA3 doesn't exist *and* FHPSCus doesn't exist -- in other words, if all of them are missing. If you want it to be true if any of them are missing, then you want "or", not "and".


Also, is there a way to set the path to a users Library folder without stating the users folder name in the path? For example, this will work on my Mac:

set FHPSA4 to "OSX STARTUP:Users:brett:Library:Application Support:Macromedia:FreeHand MX:11:English:Settings:PrintSet:PDF Settings A4"

But it won't work on my designer's Macs coz their Users folder name is "design" (coincidentally the hard drive is named the same though).

Sure: 'path to library folder from user domain'. (Possibly "as string", depending on what you're trying to do with it.) See the "path to" definition in Standard Additions for various other useful places to ask about -- in particular, 'path to application support'.



--Chris Nebel AppleScript and Automator Engineering

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Multiple IF conditions in one line & path to Users Library (From: Brett Conlon <email@hidden>)

  • Prev by Date: Multiple IF conditions in one line & path to Users Library
  • Next by Date: Re: Mail Quits Unexpectedly Using An AppleScript
  • Previous by thread: Multiple IF conditions in one line & path to Users Library
  • Next by thread: Mailing with a do shell script
  • Index(es):
    • Date
    • Thread