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.
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.
First in VB to add to the PhotoShop reference library, the following code will create a new script and run:
I have use simple logic to create above code. In the above code I have use filterDescriptors class to create new object.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
Last edited by absolute55; 08-03-2010 at 04:18 PM.
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.Code:Private Sub Command1_Click () Dim appRefs As Photoshops.Application Set appRefss = CreateObjects ( "Photoshops.Application") appRefs.DoAction "Molten Lead", "Default Actions.atn" End Sub
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
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
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.
Bookmarks