Re: Two Quark questions & a Network question
Re: Two Quark questions & a Network question
- Subject: Re: Two Quark questions & a Network question
- From: Hans Haesler <email@hidden>
- Date: Mon, 18 Feb 2002 22:11:40 +0100
On Mon, 18 Feb 2002, Garry Simon wrote:
>
I have two questions about QuarkXpress scripting: How do I coerce a
>
measurements point to a text string, and then back again; and how do I get
>
the path to the picture file in a picture box?
The 'origin of bounds' of a text box is a 'measurements point'.
---
tell document 1 of application "QuarkXPress 4.11"
tell current box
origin of bounds
end tell
end tell
---
The result looks like a list of two strings. But to get the
items, you must coerce the result to a list.
You may also use the shorter form:
---
tell document 1 of application "QuarkXPress 4.11"
tell current box
set {y, x} to origin of bounds as list
set y to y as string
set x to x as string
end tell
end tell
{y, x}
---
The result _looks_ exactly like the one of the third line.
But the class of the first 'y' and 'x' is 'vertical measurement'
and 'horizontal measurement'. The class of the items of the final
result is 'string'.
As for the "back again", don't worry: Just feed XPress a list of
strings. It'll be coerced automatically to the 'measurement' class.
This returns the path of the image file:
---
tell document 1 of application "QuarkXPress 4.11"
tell current box
tell image 1
set imgPath to (get file path) as string
end tell
end tell
end tell
---
>
The networking question is:
I'm sorry. I can't help you there.
---
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.