Re: If Statement Not Working
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