I am trying to write a script that when run will place an image into a selected picture box in a Quark document. The filepath is stored in a filemaker pro database.
It is very important that the user be able to select the picture box where they want the picture to appear for there will be many picture boxes on the quark page.
Here is what I have come up with so far. When run, nothing seems to happen. An image is not displayed in any picture box on the page.
Thanks for any help!
Karen
tell application "FileMaker Pro"
set currentFilePath to cell "convertFilePath" of current record of database 2
try
tell application "QuarkXPress™ 4.1"
set theObj to selection
set theClass to class of theObj as string
if theClass is "image" then
show page 1
tell page 1
set theObj of current box to currentFilePath
end tell
else
my quitmessage("A Picture Box is not selected!")
end if
tell current box of document 1
set bounds of theObj to proportional fit
end tell
end tell
end try
end tell
on quitmessage(theMsg)
activate
display dialog theMsg & " Please select an object and try again." buttons ("Cancel") default button 1
end quitmessage