Re: Big thank you Jay, and the next question is...
Re: Big thank you Jay, and the next question is...
- Subject: Re: Big thank you Jay, and the next question is...
- From: Jay Young <email@hidden>
- Date: Sat, 23 Nov 2002 18:58:50 -0600
Hi Bart,
I think the reason that line doesn't work is because of the word
'obsolete' that's in there. It also looks like this List mail took
away the character before '1'. I'm guessing it was the 'greater than
or equal to' character. Try inserting this in there instead (this will
probably wrap but it's actually one line of code):
-----------------------------
if (current box exists) and (box type of current box is picture box
type) and ((data size of image 1 of current box) !C 1) then
-----------------------------------
Jay
On Saturday, November 23, 2002, at 05:36 PM, bartbe wrote:
>
Jay helped me out with 2 very extensive emails, and I'm up and running
>
now.
>
Went looking thru old files (since quark 1.1, saw "graphic script" and
>
voila
>
my next question : why does it work if i delete the arrow-indicated
>
line,
>
and why does it return an error if I leave it in ? Old script syntax ?
>
>
tell application "QuarkXPress"
>
activate
>
try
>
if (current box exists) ,
>
--------> and (box type obsolete of current box is picture box) ,
>
and ((data size of image 1 of current box) 1) then
>
tell front document
>
set bounds of image 1 of current box to proportional
>
fit
>
set imageScale to scale of image 1 of current box as
>
list
>
set imageHeight to item 1 of imageScale as real
>
set imageWidth to item 2 of imageScale as real
>
if imageWidth > imageHeight then
>
set newPercent to item 2 of imageScale
>
else
>
set newPercent to item 1 of imageScale
>
end if
>
set scale of image 1 of current box to {newPercent,
>
newPercent}
>
set offset of image 1 of current box to {0, 0}
>
end tell
>
else
>
display dialog "Oops didnt see an image box"
>
end if
>
on error errText number errNum
>
if errNum -128 then
>
beep (display dialog errText)
>
end if
>
end try
>
end tell
>
_______________________________________________
>
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.
_______________________________________________
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.