Why does system lock up when scripting Quark?
Why does system lock up when scripting Quark?
- Subject: Why does system lock up when scripting Quark?
- From: email@hidden
- Date: Sun, 8 Apr 2001 07:43:24 EDT
I apologize if this is a double post, I sent it from work and from home...
I have an ongoing but intermittent problem when running a script on a Quark
page. The snippet below is a part of a much larger script (actually a piece
of a FaceSpan app, but the problem occurred before I put it into FaceSpan)
that is designed to build Quark pages rapidly in a very repetitive workflow.
At the point indicated (right about when the second picture is placed) the
system will sometimes lock up, forcing a restart. Some days the script will
run fine, other days it will lock up at almost every attempt to run it. The
reason for extracting the image offsets and angle is that often a second
version of the picture must be placed, and it has to match the coordinates
of the first version that occupied the picture box, for printing purposes.
Some additional information: G4 Macs, system 9.0.4, Quark 4.1, lots of ram
allotted to the script and to Quark, and it happens on many machines. The
images being imported are eps files. Could it be that the script runs too
fast for Quark to keep up? I've inserted delays at varying times, with no
better result. Does anyone have any idea as to why I'm locking up?
tell application "QuarkXPress(tm) 4.1"
tell page 1 of document 1
tell picture box 1
set FirstOffset to offset of image 1
set FirstAngle to angle of image 1
try
set image 1 to alias PictureFile1
on error
set image 1 to choose file with prompt (soft return)
"Choose picture 1:" of type {"EPSF"}
end try
if FirstOffset is {"0\"", "0\""} (soft return)
as measurements point then
set bounds of image 1 to centered
else
set offset of image 1 to FirstOffset
set angle of image 1 to FirstAngle
end if
end tell
tell picture box 2
try
delete image 1--this is an attempt to slow it down
end try
try
set image 1 to alias PictureFile2
set SecondOffset to offset of image 1
if SecondOffset is not {"0\"", "0\""} (soft return)
as measurements point then
set offset of image 1 to {"0\"", "0\""} (soft return)
as measurements point
end if --IT LOCKS UP ABOUT HERE
on error
choose file with prompt (soft return)
"Choose picture 2:" of type {"EPSF"}
set image 1 to result
set SecondOffset to offset of image 1
if SecondOffset is not {"0\"", "0\""} (soft return)
as measurements point then
set offset of image 1 to {"0\"", "0\""} (soft return)
as measurements point
end if
end try
end tell
end tell
end tell
(end of script)