Adding text to layer of Illustrator file

This seems simple but I am stumped. Lets say you have an illustrator file where the text is on a layer called “newtext”. If I wanted to add the text “This Works!” to that illustrator file, how do I go about it.

Never mind. I think I just figured it out. Thanks anyway.

Hi :slight_smile:
Here one suggestion (tested with AI 9 and Os 9):

property Txt : "This Works!"

tell application "Adobe Illustrator® 9.0"
	set Txt to text returned of ¬
		(display dialog "Write your text here:" default answer Txt with icon 1)
	tell document 1
		set NewText to make new text art item at beginning ¬
			with properties {kind:point text, contents:Txt, position:{100, 100}}
		set properties of text of NewText to {font:"Myriad-Bold", size:20}
	end tell
end tell