Re: QuarkXpress - exists vs. open
Re: QuarkXpress - exists vs. open
- Subject: Re: QuarkXpress - exists vs. open
- From: Hans Haesler <email@hidden>
- Date: Thu, 6 Jan 2005 22:06:00 +0100
On Thu, 6 Jan 2005, William Hopkins wrote:
> I was just wondering why this works:
>
>open file "Design06
>X:Users:admin:Desktop:Covers:PSFiles for
>Printing:test1"
>
>but this returns false for the exact same file:
>
> exists file "Design06
>X:Users:admin:Desktop:Covers:PSFiles for
>Printing:test1"
William,
you should have posted the entire snippet? Then we wouldn't
have to guess the rest of the code...
Well... I guess the second command is in a 'tell QXP' block.
If you would have put it in a 'tell Finder' block then the
result would have been 'true'.
But one should avoid adressing the Finder whenever it's
possible. Better do it this way:
---
try
alias "Design06 X:Users:admin:Desktop:Covers:PSFiles for Printing:test1"
return true -- just for demo purposes
on error
-- the file doesn't exist, so replace the following
-- command by the necessary action(s)
return false
end try
---
Hans Haesler <email@hidden>
_______________________________________________
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