The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Applescript is a PITA: Exporting Keynote as PDF

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ryan Davis

Posts: 651
Nickname: zenspider
Registered: Oct, 2004

Ryan Davis is a ruby nerd.
Applescript is a PITA: Exporting Keynote as PDF Posted: Jul 23, 2007 1:02 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Ryan Davis.
Original Post: Applescript is a PITA: Exporting Keynote as PDF
Feed Title: Polishing Ruby
Feed URL: http://blog.zenspider.com/index.rdf
Feed Description: Musings on Ruby and the Ruby Community...
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Ryan Davis
Latest Posts From Polishing Ruby

Advertisement
on run
  display dialog "Drag keynote documents on me to convert to PDF."
end run

on open draggeditems
  repeat with thisFile in draggeditems as list
    tell application "Finder" to reveal item thisFile
    set thisFile to thisFile as alias

    tell application "Keynote" to open thisFile

    tell application "System Events"
      tell application process "Keynote"
        set frontmost to true

        if menu item "Hide Inspector" of menu 1 of menu bar item "View" of menu bar 1 exists then
          keystroke "i" using {command down, option down}
        end if

        click menu item "Export…" of menu 1 of menu bar item "File" of menu bar 1

        repeat until sheet 1 of window 1 exists
        end repeat

        tell sheet 1 of window 1
          click radio button "PDF" of radio group 1
          click button "Next…"
        end tell

        repeat until button "Export" of sheet 1 of window 1 exists
        end repeat

        tell sheet 1 of window 1
          click button "Export"
        end tell

        delay 3
        keystroke "w" using command down
      end tell
    end tell

  end repeat
end open

Read: Applescript is a PITA: Exporting Keynote as PDF

Topic: Estándar para una web 100% fácil de leer Previous Topic   Next Topic Topic: Vancouver Ruby & Rails Job Board Now Live

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use