Page 1 of 1

simple script not working

Posted: 03 Jan 2015, 00:59
by MaryJosh
I am using Mac OS X (version 10.6.8), QuarkXpress 8.15 and Applescript Editor (version 2.3)

Why the below script is not working in my quark? Not only this script most of the scrip is not working in my quark.

Code: Select all

tell application "QuarkXPress"
	activate
	tell page 1 of document 1
		set text of text box 1 to "Test"
	end tell
end tell
Shows the result as below:

tell application "QuarkXPress"
activate
set every text of text box 1 of page 1 of document 1 to "Test"
--> error number -1728
Result:
error "QuarkXPress got an error: Can’t set every text of text box 1 of page 1 of document 1 to \"Test\"." number -10006 from every text of text box 1 of page 1 of document 1 to «class Test»

Re: simple script not working

Posted: 03 Jan 2015, 14:10
by ddwebdev
Working well on
Quark 9.5
OS 10.9.5
applescript version 2.6
...
P.S. With your script, you have to create the textbox yourself before running it

try it with creating the textbox by script

Code: Select all

tell application "QuarkXPress"
	activate
	tell page 1 of document 1
		make new text box at beginning with properties {bounds:{"1 in", "1 in", "3 in", "6 in"}}
		set text of text box 1 to "Test"
	end tell
end tell

Re: simple script not working

Posted: 05 Jan 2015, 05:20
by Jean-Marie Schwartz
As far as I remember there was (is) a bug with any text scripting. One would need to deactivate some East Asian XTs. Search the forum and you'd find some threads about that. HTH.