• 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: If Statement Not Working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: If Statement Not Working


  • Subject: Re: If Statement Not Working
  • From: Timothy Bates <email@hidden>
  • Date: Mon, 30 Jul 2001 11:14:11 +1000

use something like

set fileA to "" & (name of startup disk) & "PP:PPBusiness:BCData.FP5"
set fileB to "" & (name of startup disk) & "PP:PPBusiness: BCEmployee.FP5"
--the initial "" makes sure the whole thing comes back as a string
--alternatively
set fileA to (name of startup disk & "PP:PPBusiness:BCData.FP5") as string

tell app "Finder
if (fileA exists and fileB exists) then
move fileA to folderC
-- anything else you need to do
else
display dialog "hey! where's those files?"
end
end

On 30/7/01 10:05 AM, "George Priggen" <email@hidden> wrote:
> But if I try to connect to two if statements with an "and":
>
> tell application "Finder"
> if file "BCData.FP5" of folder "PPBusiness" of folder "PP" of startup
> disk exists and file "BCEmployee.FP5" of folder "PPBusiness" of folder "PP"
> of startup disk exists then
> move ... etc
>
> Applescript will not allow me to do it. Is there a way of combining to two
> if statements?

Dr Timothy Bates <mailto:email@hidden>
Macquarie Centre for Cognitive Science (MACCS)
Macquarie University
Ph 61 (2) 9850 8623
Fx 61 (2) 9850 6059


References: 
 >Re: If Statement Not Working (From: George Priggen <email@hidden>)

  • Prev by Date: Re: If Statement Not Working
  • Next by Date: Re: Scripting Startup Disk control panel
  • Previous by thread: Re: If Statement Not Working
  • Next by thread: Re: If Statement Not Working
  • Index(es):
    • Date
    • Thread