System Events scripting?

I am trying to do some cheating with a script I’m working on, so I’m attempting to invoke system events and do that. I’ve been doing some reading, and I’ve read how to control menus, how to click buttons, and how to click tab buttons. My question is this: is there a way to something from a chose a drop down menu? Say for instance I wanted to print this page, and when I do that, under the drop-down that says “Copies & Pages” I wanted to choose “Output Options”… is there a way to do this?

You don’t say which application you’re trying to target, slinkeepie - and that can make a difference. Bear in mind that some apps are a bit more co-operative than others in this respect. (For example, there’s no shortage of frustrated Adobe users around here, trying to get some printing done.)

While I can’t readily dig out a situation that offers “Output Options”, the following example, using Safari, might help to point you in the right direction. (Hopefully, your print options will be similar to mine.)

Assuming there’s a printable document in Safari, the script should:

tell application "Safari" to activate
tell application "System Events" to tell sheet "Print" of window 1 of process "Safari"
	keystroke "p" using command down
	tell pop up button 1
		repeat until exists
			delay 0.1
		end repeat
		click
		click menu item "Paper Feed" of menu 1
	end tell
	tell pop up button -1 of UI element 1 of UI element 5
		repeat until exists
			delay 0.1
		end repeat
		click
		click menu item "Manual Feed" of menu 1
	end tell
end tell

“frustrated Adobe users” I’d say so trying to do system event scripting has given me a right headache!!! if their not going to add features to the scripting they could at least try and make this easier.

what i’m trying to script would be Quark Xpress… i’m having a problem with creating PDFs… i have a script that prints a postscript, then distills the postscript, thus creating the PDF. this isn’t how we make our pdf’s though… we choose Adobe PDF by clicking the “Printer” button on the Print window. Then we have to choose a PDF setting under PDF Options.