Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



How to script in photoshop?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 08-03-2010
Member
 
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.
Reply With Quote
  #2  
Old 08-03-2010
absolute55's Avatar
Member
 
Join Date: Nov 2005
Posts: 1,238
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.
Reply With Quote
  #3  
Old 08-03-2010
Reegan's Avatar
Member
 
Join Date: Oct 2005
Posts: 2,299
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.
Reply With Quote
  #4  
Old 08-03-2010
Member
 
Join Date: May 2008
Posts: 1,990
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
Reply With Quote
  #5  
Old 08-03-2010
MindSpace's Avatar
Member
 
Join Date: Feb 2008
Posts: 1,832
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
Reply With Quote
  #6  
Old 08-03-2010
Modifier's Avatar
Member
 
Join Date: Jan 2008
Posts: 1,502
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to script in photoshop?"
Thread Thread Starter Forum Replies Last Post
Photoshop Elements 7 or Photoshop CS4 neonxgenesis Windows Software 3 19-11-2009 08:45 AM
Word 2008 + bibfuse: no script in script menu deval4u Software Development 5 06-04-2009 01:53 PM
Problem with script in order to open another script in an extra window Samsher Software Development 2 14-01-2009 01:25 PM
Adobe Introduces Photoshop CS4 and Photoshop CS4 Extended urgaffel Web News & Trends 1 23-09-2008 01:51 PM
Adobe Post script Fonts CS3 Indesign, Illustrator and Photoshop Cindy Vista Help 6 28-07-2008 12:22 AM


All times are GMT +5.5. The time now is 11:21 AM.