[mac]Using AppleScript

MS Windows에 매크로가 있다면 Mac에는 애플스크립트가 있다

  1. Batch Convert Keynote Files to PDF with AppleScript
#! /bin/sh

for FILE in `find "${PWD}" -name \*.pptx -or -name \*.key`; do  
  DIR=`dirname $FILE`
  echo Converting $FILE to PDF
  osascript << EOF
tell application "System Events"  
  tell application "Keynote"
    activate
    open "${FILE}"
  end tell
  tell process "Keynote"
    click menu item "PDF…" of menu of menu bar item "Share" of menu bar 1
    click button "Next…" of sheet 1 of window 1
    keystroke "G" using {command down, shift down}
    keystroke "${DIR}"
    click button "Go" of sheet 1 of sheet 1 of window 1
    click button "Export" of sheet 1 of window 1
  end tell
  do shell script "killall Keynote"
end tell  
EOF  
done  
Print Friendly, PDF & Email
%d bloggers like this: