I am having trouble getting one part of a Quark AppleScript to work. I have a query early on in the script where you click a button whether you will want the placed tiff to be black or white:
set TIFFColor to the button returned of (display dialog “Choose TIFF Color” buttons {“Black”, “White”})
When placing the image in the script, where you would normally tell it:
set color of image 1 of picture box “LogoTiffBox” to “White”
I am trying to put the variable in place of the hard-wired “White” but it errors out when I run it. Is there a trick to getting Quark to use a variable to call out a color from the color palette?? I tried setting the variable “as text” and “as string” but that didn’t seem to be the problem. Here is the relevant part of the code:
tell application "QuarkXPress"
activate
open file theTemplate use doc prefs yes remap fonts no do auto picture import no
tell front document
set tool mode to contents mode
make new picture box at beginning of page 1 with properties {bounds:{"0\"", "0\"", "4\"", "4\""}, color:null, name:"LogoTiffBox"}
set image 1 of picture box "LogoTiffBox" to this_file as alias
[b]set color of image 1 of picture box "LogoTiffBox" to TIFFColor[/b]
Any ideas??
Model: Mac G5
Operating System: Mac OS X (10.3.9)