Apple script Preview or print to pdf for pdf creation
Apple script Preview or print to pdf for pdf creation
- Subject: Apple script Preview or print to pdf for pdf creation
- From: Kok Ooi Kong <email@hidden>
- Date: Wed, 23 Jul 2003 16:29:48 +0800
Below is an incomplete example - what you get is a pdf file with the
name of "untitle" in the default folder where pdf file is print to.
tell application "Preview"
activate
tell application "System Events"
tell process "Preview"
set frontmost to true
keystroke "p" with command down
delay 2
set frontwindow to the name of window 1 as string
tell window frontwindow
tell window "Print"
tell UI element 1
tell pop up button 1
click
delay 1
tell menu 1
click menu item "Output Options"
delay 1
end tell
end tell
click check box "Save as File" of UI element 1 of UI element 3
delay 1
click button "Save..." of UI element 4
delay 1
keystroke return
end tell
end tell
end tell
end tell
end tell
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.