text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
return {newName, targetPOSIXpath} | lns3.scpt |
set the targetPOSIXpath to (targetFolderPOSIXPath & targetName) | lns3.scpt |
return {targetName, targetPOSIXpath} | lns3.scpt |
end deriveFileNameForNewFileInFolder | lns3.scpt |
display dialog "This script will export the front presentation as images and then create a new presentation containing the exported images." & return & return & "Slide transitions and presenter notes will be transfered from the source presentation." with icon 1 | lns3.scpt |
set the slideCount to the count of (every slide whose skipped is false) | lns3.scpt |
set the targetFolder to (make new folder at desktop) | lns3.scpt |
export the front document as slide images to file targetFolderHFSPath with properties {image format:PNG, skipped slides:false, export style:IndividualSlides} | lns3.scpt |
set theseItems to every document file of the targetFolder | lns3.scpt |
set theseItems to sort theseItems by name | lns3.scpt |
set theseImageFiles to {} | lns3.scpt |
set the end of theseImageFiles to (item i of theseItems) as alias | lns3.scpt |
set newPresentation to make new document with properties {document theme:theme "Black", width:documentWidth, height:documentHeight} | lns3.scpt |
tell newPresentation | lns3.scpt |
set blankMasterSlide to master slide "Blank" | lns3.scpt |
set the base slide of slide 1 to blankMasterSlide | lns3.scpt |
set locked of thisImage to true | lns3.scpt |
set thisSlide to make new slide with properties {base slide:blankMasterSlide} | lns3.scpt |
repeat with i from 1 to slideCount | lns3.scpt |
tell document 2 | lns3.scpt |
set sourceSlide to (the first slide whose slide number is i) | lns3.scpt |
set theseTransitionProperties to transition properties of sourceSlide | lns3.scpt |
set thesePresenterNotes to the presenter notes of sourceSlide | lns3.scpt |
set transition properties of slide i to theseTransitionProperties | lns3.scpt |
set presenter notes of slide i to thesePresenterNotes | lns3.scpt |
start the front document from the first slide of the front document | lns3.scpt |
property thisThemeName : "Image Grid Kiosk" | lns3.scpt |
property gridSlideMasterName : "Photo - Grid 28" | lns3.scpt |
property photoSlideMasterName : "Photo" | lns3.scpt |
property squarePhotoSlideMasterName : "Photo - Square" | lns3.scpt |
property defaultAutomaticTransistion : true | lns3.scpt |
property defaultImageDisplayTime : 3 | lns3.scpt |
set the templateNames to the name of every theme | lns3.scpt |
if thisThemeName is not in the templateNames then error number 1000 | lns3.scpt |
set albumNames to my iPhotoAlbumNames() | lns3.scpt |
if albumNames is false then error number 1001 | lns3.scpt |
set chosenAlbum to ¬ | lns3.scpt |
(choose from list albumNames with prompt ¬ | lns3.scpt |
"Pick the album containing images to import:") | lns3.scpt |
if chosenAlbum is false then error number -128 | lns3.scpt |
set the imagePaths to ¬ | lns3.scpt |
the preview path of every photo of album (chosenAlbum as string) | lns3.scpt |
set albumImageCount to the count of the imagePaths | lns3.scpt |
if albumImageCount is 0 then error number 1002 | lns3.scpt |
make new document with properties {document theme:theme thisThemeName} | lns3.scpt |
tell the current slide | lns3.scpt |
set base slide to master slide "Title - Center" of thisDocument | lns3.scpt |
set the object text of the default title item to the presentationTitle | lns3.scpt |
{transition effect:dissolve ¬
, transition duration:2 ¬
, transition delay:3 ¬
, automatic transition:defaultAutomaticTransistion} | lns3.scpt |
set gridSlide to make new slide with properties {base slide:master slide gridSlideMasterName} | lns3.scpt |
tell gridSlide | lns3.scpt |
{transition effect:magic move ¬
, transition duration:2 ¬
, transition delay:0 ¬
, automatic transition:defaultAutomaticTransistion} | lns3.scpt |
set the gridCount to the count of images | lns3.scpt |
set theseImagePaths to items 1 thru gridCount of the imagePaths | lns3.scpt |
repeat with i from 1 to the gridCount | lns3.scpt |
set thisImageFile to (item i of theseImagePaths) as POSIX file | lns3.scpt |
set the file name of image i to thisImageFile | lns3.scpt |
repeat with i from 1 to the count of theseImagePaths | lns3.scpt |
my addInboundSquarePhotoSlide(thisImageFile) | lns3.scpt |
my addPhotoSlide(thisImageFile) | lns3.scpt |
my addOutboundSquarePhotoSlide(thisImageFile) | lns3.scpt |
duplicate slide 2 to after last slide | lns3.scpt |
set the transition properties to {transition delay:2} | lns3.scpt |
set auto play to true | lns3.scpt |
if errorNumber is 1000 then | lns3.scpt |
display alert "MISSING RESOURCE" message "This script requires the installation of a Keynote theme titled “" & thisThemeName & ".”" & return & return & "The template can be downloaded from: iworkautomation.com" as critical buttons {"Download", "Stop"} default button 2 | lns3.scpt |
if the button returned of the result is "Download" then | lns3.scpt |
open location "http://iworkautomation.com/keynote/examples-grid-kiosk.html" | lns3.scpt |
else if errorNumber is 1001 then | lns3.scpt |
set errorNumber to "iPhoto Issue" | lns3.scpt |
set errorMessage to "There was a problem getting a list of albums from iPhoto." | lns3.scpt |
else if errorNumber is 1002 then | lns3.scpt |
set errorMessage to "The chosen album contains no photos." | lns3.scpt |
else if errorNumber is 1003 then | lns3.scpt |
set errorMessage to "There are more image placeholders than album images." | lns3.scpt |
on iPhotoAlbumNames() | lns3.scpt |
return (the name of every album) | lns3.scpt |
end iPhotoAlbumNames | lns3.scpt |
on addInboundSquarePhotoSlide(thisImageFile) | lns3.scpt |
set thisSlide to ¬ | lns3.scpt |
make new slide with properties ¬ | lns3.scpt |
{base slide:master slide squarePhotoSlideMasterName} | lns3.scpt |
set the file name of the first image to thisImageFile | lns3.scpt |
{transition effect:dissolve ¬
, transition duration:0.5 ¬
, transition delay:0 ¬
, automatic transition:defaultAutomaticTransistion} | lns3.scpt |
end addInboundSquarePhotoSlide | lns3.scpt |
on addOutboundSquarePhotoSlide(thisImageFile) | lns3.scpt |
{transition effect:magic move ¬
, transition duration:1.5 ¬
, transition delay:0 ¬
, automatic transition:defaultAutomaticTransistion} | lns3.scpt |
end addOutboundSquarePhotoSlide | lns3.scpt |
on addPhotoSlide(thisImageFile) | lns3.scpt |
set thisSlide to make new slide with properties {base slide:master slide "Blank"} | lns3.scpt |
set its height to documentHeight | lns3.scpt |
set its position to {(documentWidth - (its width)) div 2, 0} | lns3.scpt |
{transition effect:dissolve, transition duration:0.5 ¬
, transition delay:defaultImageDisplayTime ¬
, automatic transition:defaultAutomaticTransistion} | lns3.scpt |
end addPhotoSlide | lns3.scpt |
on duplicateSlideToEnd(thisSlide) | lns3.scpt |
duplicate thisSlide to after last slide | lns3.scpt |
end duplicateSlideToEnd | lns3.scpt |
property idleTimeInSeconds : 1 | lns3.scpt |
global playlistTitle, hasPlayed, startFlag | lns3.scpt |
if running of application "iTunes" is false then | lns3.scpt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.