GUI Scripting Illustrator

Howdy–

I’m trying to GUI script the window in Illustrator that appears on opening a file that has a broken link. I’m looking to check the “Apply to all” checkbox and click the “Extract” button. Here’s a screen shot for context:

http://www.oatmealandcoffee.com/blog/images/AICS2MisslingLink.png

The code that actually opens the file is here:


set theFileName to name of (info for (theFile as alias))
	tell application "Adobe Illustrator"
		open (theFile as alias) with options {update legacy text:true} without dialogs
		tell application "System Events"
			tell process "Illustrator"
				tell window 1
					click "Apply to All"
					click "Extract"
				end tell
			end tell
		end tell
end tell

I’ve used the two tools Apple provides to suss out the hierarchical location of both control, but the script isn’t capturing the window and no name is given for it in either of the tools. the script that passes through the “System Events” block without error. Has anyone else figured out how to do something like this? I’m afraid I’m a bit out of my element on this one.

Thanks!