UI element

I need to change the value in a text box of a dialog box and can’t seem to figure it out. any help would be greatly appreciated

Give us a scriptlet of what you’ve tried.

A bit more information (which application, which text box, etc) would be greatly appreciated :wink:

here you go

tell application "Adobe Illustrator"
	tell application "System Events"
		keystroke "p" using {command down, option down}
		delay 1
		set value of text area 1  of window 1 of application process "adobe Illustrator" to "8,5"

Isn’t there a property in Illustrator’s directory, to set the page size directly ?

not that I can find at least not one that I can write to. That would be much more efficient than driving the dialog box

Model: MacBook Pro (intel core dou)
Browser: Firefox 2.0
Operating System: Mac OS X (10.4)

Maybe you can find something in here:


thats and excellent piece of documentation but still no luck why is it I cant set the value in the dialog box ?

I don’t have illustrator, but have you tried something like this:

activate application "Adobe Illustrator"
tell application "System Events" to tell process "Adobe Illustrator" to
	keystroke "p" using {command down, option down}
	delay 1
	keystroke "8,5" & return
end tell

Hi Mcgralim

Are you just trying to create a new document with a certain page size in illustrator,
cause you can just do this.

tell application "Illustrator CS"
	make new document with properties {height:11.6929 * 72, width:8.2677 * 72}
end tell

--->creates an A4 document

Should work just as well for illustrator cs2, illustrator only accepts sizes in points so you have to convert them for millimetres, inches etc…
Once the page is created though the only way to re size the document would be to script it via the Gui…