Quark 6.5 Coloring placed image OS 10.3.9

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)

I think “White” and “Black” compile to something other than an AppleScript string within a Quark tell block. If you try something like

if TIFFcolor = "Black" then
set qrkColor to "Black"
else
set qrkColor to "White"
end if
            set color of image 1 of picture box "LogoTiffBox" to qrkColor

it should work. It works for me, anyhow.

  • Dan

It just occurred to me that that doesn’t really buy you anything, as you might as well just say

if TIFFcolor = "Black" then
set color of image 1 of picture box "LogoTiffBox" to "Black"
else
if TIFFcolor = "White" then
set color of image 1 of picture box "LogoTiffBox" to "White"
end if
end if

but I’m not sure of a way of converting an AppleScript string to a Quark “string” or whatever it is it’s looking for to satisfy the Quark image color. That was a lot of help, wasn’t it?

I actually just came up with that this morning. I have a feeling that might be the only way to do it. It seems like it should be simpler than that, but I guess it’s not…

Thanks for the input.