Re: Quark 4.11 v. Quark 5 problem
Re: Quark 4.11 v. Quark 5 problem
- Subject: Re: Quark 4.11 v. Quark 5 problem
- From: Hans Haesler <email@hidden>
- Date: Fri, 21 Mar 2003 09:50:21 +0100
On Thu, 20 Mar 2003, Bjorn Van Blanckenberg wrote:
>
tell application "QuarkXPress Passport 4.1"
>
tell document 1
>
tell page "6"
>
set theImages to (object reference of every image)
>
set theImages to (coerce theImages to list)
>
end tell
>
end tell
>
end tell
>
>
This works in Quark 4.11 but in Quark 5 I always getting an error on object
>
reference of page 6.
>
Is there someone that could tell me why it doesn't work in Quark 5 and what
>
I could use instead.
Hello Bjorn,
I guess you're getting the error on _every_ page (not only on page 6).
Try it like this:
---
tell application "QuarkXPress 5.01"
tell document 1
tell page "6"
set theImages to object reference of every image of every picture box
end tell
end tell
end tell
---
With QXP 5.01 the result is a list, even if there is only one image.
With QXP 4.1 (you should update to 4.11 !!!) and QXP 4.11 you don't
need to coerce the result to a list if there is more than one image.
So: test the class of 'theImages', first, and set it only to list if
it isn't a list (but 'image'):
---
if class of theImages is not list then set theImages to {theImages}
---
Hans Haesler <email@hidden>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.