Illustrator CS and Applescript Font and printing issues

I have been trying to work with applescript and Illustrator CS. After spending a number of hours trying to figure out what I was doing wrong when my actions wouldn’t save links to scripts, I was informed this was a bug in Illustrator!

I have since been trying to do what should be two relatively simple things, neither of which will work. The first is to have the script print an illustrator document with the dialog box made available so I can choose the printer depending on the document.

print document 1
print document 1 without dialog
print document 1 with dialog

all give the same result–the document prints with out the dialog coming up. I worked around this by having the script call a print action in Illustrator, but there should be a way to do it in the script…

The second problem is I cannot get a font applied to text. I have tried to choose the font as part of the properties when I make a text frame

make new text frame in document 1 with properties {name:“T1”, contents:“My message”, position:{400, 760}, font:“Courier”}

I have also tried to set the font after the make routine.

set font of text frame “T1” to “Courier”

I have tried a number of variations on both of these but I keep getting messages such as

Can't set text frame...
Can't get some objects..

Is this also a bug or am I missing something really obvious? Any help will be greatly appreciated.

Jim D

this will bring up the print dialog box without printing the document

tell application "System Events"
	keystroke "p" using command down
end tell