tell application “System Events“
tell window “プリント” of process “Adobe Acrobat Professional“
tell UI element 1 of UI element 6
click UI element 1 of UI element 17
end tell
end tell
end tell
on pdf01()
tell document 1 of application “Adobe InDesign CS2_J“
export format PDF type to alias a1 with showing options
end tell
print1(a1) of me
end pdf01
on print1(a1)
tell application “Adobe Acrobat Professional“
activate
close documents
end tell
tell application “System Events” to repeat until (count (every window of process “Adobe Acrobat Professional“)) = 0
end repeat
tell application “Adobe Acrobat Professional” to open alias a1
tell application “System Events“
click menu item “プリント…” of menu 1 of menu bar item 3 of menu bar 1 of process “Adobe Acrobat Professional“
delay 3
tell window “プリント” of process “Adobe Acrobat Professional“
tell UI element 1 of UI element 6
set value of UI element 6 to “2” —-印刷部数の設定
end tell
click button “プリント” of UI element 5
end tell
end tell
delay 3
tell application “System Events” to repeat until (count (every window of process “Adobe Acrobat Professional“)) = 1
end repeat
try
tell application “Adobe Acrobat Professional” to close documents
end try
end print1