GUI scripting page set up

Dear All,

Help please, I am new to this GUI scripting.
I am trying to activate the page set up menu and then choose A4 as the paper size. So far I have:

tell application “Finale 2004b”
activate
tell application “System Events”
tell application process “Finale 2004b”
click menu item “Page Setup…” of menu “File” of menu bar item “File” of menu bar 1
end tell
end tell
end tell

whick works fine and opens the page set up window. How do I choose A4 (or whatever) from the the paper size menu?

Thanks in advance

Dave Hage
Dakota Music Service Ltd

Hi,

I don’t have Finale so got this with TextEdit:

tell application “TextEdit” to activate
tell application “System Events”
tell process “TextEdit”
keystroke “p” with {command down, shift down}
tell front window
tell window “Page Setup”
tell UI element 1
tell UI element 3
tell UI element 1
tell pop up button 1
click
–delay 1
–every UI element
click menu item “A4” of menu 1
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell

You can try running it and see what happens. It takes a while on my computer to select the A4 size.

gl,