Photoshop自动化

Photoshop Automation

我想通过 Visual basic UI 运行 photoshop 动作。我的意思是,如果用户单击按钮,那么 photoshop 操作应该 运行。

任何人都可以给出任何提示吗? 谢谢

Public Class Form1
    Dim appRef
    Dim app
    Dim File
    Dim JavaScriptFile
    Dim nums(2)
    Dim argsArr()
    Dim photoshopApp As Photoshop.Application
    Dim photoshopDoc As Photoshop.Document
    Dim curLayer As Photoshop.ArtLayer
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        appRef = CreateObject("Photoshop.Application")
        app.load(File("C:\Border-2.atn"))
        app.DoAction(ThisQueue.Dequeue)
    End Sub

您必须先在 Photoshop 中加载动作或动作集!您不能像您尝试的那样加载或调用 Actions。 App.load (File (...指加载图片。

   Private Sub PhotoshopDoAction(ByVal action As String, ByVal actionSet As String)
        Dim PS As Photoshop.Application

        PS = New Photoshop.Application
        If PS.Application.Documents.Count > 0 Then
            PS.DoAction(action, actionSet)

        End If

    End Sub