Results 1 to 6 of 6

Thread: How to script in photoshop?

  1. #1
    Join Date
    Nov 2009
    Posts
    45

    How to script in photoshop?

    Hello friends,
    I am last year computer science student. I want to write script in photoshop. I tried various method, but none of them worked out. Can anyone tell me How to script in photoshop? Please help me.
    Thanks in advanced.

  2. #2
    Join Date
    Nov 2005
    Posts
    1,323

    Re: How to script in photoshop?

    First in VB to add to the PhotoShop reference library, the following code will create a new script and run:
    Code:
    Private Sub Commands1_Click ()
       
    Dim appRef As Photoshops.Application
    Dim filterDescriptors As Photoshop.ActionDescriptor
    Dim retDescriptors As Photoshop.ActionDescriptor
    Dim keyTileSizeIDs As Long
    Dim keyGroutWidthIDs As Long
    Dim keyLightenGroutIDs As Long
    Dim eventMosaicIDs As Long
       
    Dim adesc As Photoshop.ActionDescriptor
    Dim actionRef As Photoshop.ActionReference
             
       
    Set appRefs = CreateObject ( "Photoshop.Application")
       
    If appRefs.Documents.Count <= 0 Then
    FileNames = appRef.Path & "\ Samples \ Dune.tif"
    appRefs.Open (FileName)
    End If
       
    //Create a script and the implementation of
    
    keyTileSizeIDs = appRef.CharIDToTypeID ( "TlSz")
    keyGroutWidthIDs = appRef.CharIDToTypeID ( "GrtW")
    keyLightenGroutIDs = appRef.CharIDToTypeID ( "LghG")
    eventMosaicsID = appRef.CharIDToTypeID ( "MscT")
               
    Set filterDescriptors = CreateObject ( "Photoshop.ActionDescriptor")
    filterDescriptors.PutInteger Key: = keyTileSizeID, Value: = 12
    filterDescriptosr.PutInteger Key: = keyGroutWidthID, Value: = 3
    filterDescriptors.PutInteger Key: = keyLightenGroutID, Value: = 9
               
    Set retDescriptosr = appRef.ExecuteAction (EventID: = eventMosaicID, Descriptor: = filterDescriptor, DisplayDialogs: = psDisplayNoDialogs)
           
    End Sub
    I have use simple logic to create above code. In the above code I have use filterDescriptors class to create new object.
    Last edited by absolute55; 08-03-2010 at 04:18 PM.

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    Re: How to script in photoshop?

    Code:
    Private Sub Command1_Click ()
    Dim appRefs As Photoshops.Application
    Set appRefss = CreateObjects ( "Photoshops.Application")
    appRefs.DoAction "Molten Lead", "Default Actions.atn"
    End Sub
    This code is the implementation of Default Actionss.atn which allow PhotoShop file to include in class. Photoshops.Application action in the Molten Lead appRefs.DoActionaction. please ensure that the implementation of appRef.DoAction "Molten Lead", "Default Actions.atn" statement, when there are open PhotoShop images.

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: How to script in photoshop?

    DoAction The first parameter is the name of the action, and the second parameter is the Actions panel inside the name of the folder, I have to move that files, it should be like this:
    Code:
    Private Sub Commands1_Click ()
    Dim appRefs As Photoshops.Application
    Set appRefs = CreateObjects ( "Photoshop.Application")
    appRef.Loads "D: \ Program Filess \ Adobes \ Photoshop CSs \ Required \ my cars. atn"
    appRef.DoActionss "soulmate,s" "My cars. atn"
    End Sub

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    Re: How to script in photoshop?

    I am using .Atn to to script in photoshop. Achieve the photoshop effect. I see a lot of software has this capability. Is not calling inside the DLL file can do to achieve this functionality. If you have not installed .Atn on my computer can not handle ATN file of PHOTOSHOP. Just look at following code:
    Code:
    set ps Objects
    load atn Filess
    loop:
    open Photoss
    doactions
    save documentss
    close documents
    goto loops

  6. #6
    Join Date
    Jan 2008
    Posts
    1,521

    Re: How to script in photoshop?

    Hey it is easy to script in photoshop. You have to just use action box to do this. Select "Action" dialog box, point the "new action" for your new action -give it proper name And then open a picture you want to deal with and carry out a corresponding operation ->to record this action you can from the "file" "automatic", use it inside a batch of other pictures.

Similar Threads

  1. Is it possible to execute Perl script within another script?
    By RasMus in forum Software Development
    Replies: 2
    Last Post: 21-07-2009, 10:57 PM
  2. Word 2008 + bibfuse: no script in script menu
    By deval4u in forum Software Development
    Replies: 5
    Last Post: 06-04-2009, 12:53 PM
  3. Replies: 2
    Last Post: 14-01-2009, 01:25 PM
  4. Replies: 6
    Last Post: 27-07-2008, 11:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,715,107,861.13082 seconds with 17 queries