I cannot work out how to set the Page Setup for an existing file to a specific paper

RKC007

Registered
The following script is not working on my system:


property Finale : "Finale 2009" -- Change to your Finale-version

tell application "Finder"
set theFolder to choose folder
set theFiles to every file of theFolder
end tell

repeat with thisFile in theFiles
tell application Finale to activate
open thisFile
tell application "System Events"
tell process Finale
click menu item "Page Setup…" of menu "File" of menu bar item "File" of menu bar 1
delay 0.2
tell window 1
click pop up button 2
click menu item 4 of menu 1 of pop up button 2 -- item 4 is 'A5', change to the one you need.
delay 0.1
click button "Ok"
end tell
delay 0.2
click menu item "Save" of menu "File" of menu bar item "File" of menu bar 1
click menu item "Close" of menu "File" of menu bar item "File" of menu bar 1
end tell
end tell
end repeat

OR

//Change <File/Page setup>
menu item "Page Setup"
dropdown "A4" near "Page Size:"
Click "Portrait"
press "ok"

Any Idea?
 
Top