none
vb 控制photoshop动作

    问题

  • 我想通过VB的界面来操作photshop的动作. 就是按钮按钮的时候,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

    2016年2月29日 13:00

答案

  • 你好,

    需要先加载photoshop的actions 或 actionSet,

    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

    Best regards,

    Cole Wu

    2016年3月1日 14:19
    版主