Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: Using PhotoShop Action/Scripts in command line

$
0
0

Thanks for the replay, unfortunately, Photoshop doesn't have a command line capabilities, but I was able to automate and call an Action.  I created a VB.NET window application, added the reference to "Adobe PhotoShop CC Object Library".  I added this code to a button's Click Event

 

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim appRef As Photoshop.Application = CreateObject("Photoshop.Application")

        Dim sFile As String = "C:\Temp\Images\MyPicture.psd"

 

        appRef.Open(sFile)

        appRef.DoAction("ResizeToJPG", "SavedActions")

        appRef.ActiveDocument.Close()

        appRef.Quit()

 

        appRef = Nothing

    End Sub

 

 

This will open up the PhotoShop Application.  I open the image, apply the Action, close the image, and shutdown the application.  Literally, you will see all the step on the computer, so make sure that you don't interfere with the steps.  Good Luck

 

Robert J


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>