Skip to content

Instantly share code, notes, and snippets.

@zehfernandes
Created May 4, 2017 03:26
Show Gist options
  • Save zehfernandes/4722200f1a2c0e8d90f8bf38a77ef188 to your computer and use it in GitHub Desktop.
Save zehfernandes/4722200f1a2c0e8d90f8bf38a77ef188 to your computer and use it in GitHub Desktop.
tell application "Finder"
set folderFiles to (choose folder with prompt "Please select directory.")
set file_list to name of every file of entire contents of folderFiles
end tell
tell application "Keynote"
activate
tell the front document
repeat with fileName in file_list
set the newSlide to make new slide
set the base slide of the newSlide to master slide "MASTER-LAYER-NAME"
set thisPlaceholderImageItem to image 1 of newSlide
set file name of thisPlaceholderImageItem to alias ((folderFiles as string) & fileName)
end repeat
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment