Second Sample Script

The following script presents a progression of images as a PDF slide show. PDFPresentation.vbs

' use all the files in the Samples folder

Dim appRef, inputFiles(), i, outputFile, options

Set appRef = CreateObject("Photoshop.Application")

' get all the files found in this folder

Set fsoRef = CreateObject( "Scripting.FileSystemObject" ) Set folderRef = fsoRef.GetFolder( appRef.Path & "Samples\" )

ReDim inputFiles(folderRef.Files.Count)

For Each f in folderRef.Files inputFiles(i) = f.Path i = i + 1 Next

' output to the desktop outputFile = "C:\\JavaScriptPresentation.pdf"

' there are defaults but I like to set the options myself Set options = CreateObject("Photoshop.PresentationOptions") options.Presentation = true options.Encoding = 2 'for PsPDFEncoding --> 2 (psPDFJPEG) options.AutoAdvance = true options.Interval = 5 options.Loop = true options.Transition = 10 'for PsTransitionType --> 10 (psRandom) ' create the presentation appRef.MakePDFPresentation inputFiles, outputFile, options

Photoshop Secrets

Photoshop Secrets

Are You Frustrated Because Your Graphics Are Not Looking Professional? Have You Been Slaving Over Your Projects, But Find Yourself Not Getting What You Want From Your Generic Graphic Software? Well, youre about to learn some of the secrets and tips to enhance your images, photos and other projects that you are trying to create and make look professional.

Get My Free Ebook


Post a comment