• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Apple script Preview or print to pdf for pdf creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Why is AS so poorly documented?
  • Next by Date: Re: Apple mail: Save attached file
  • Previous by thread: Re: Universal Date Entry (was: Date - 1 day in Address Book)
  • Next by thread: Re: Apple mail: Save attached file
  • Index(es):
    • Date
    • Thread