RetouchPRO

Go Back   RetouchPRO > Tools > Software
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Software Photoshop, Lightroom, Paintshop Pro, Painter, etc., and all their various plugins. Of course, you can also discuss all other programs, as well.

is there a way to record a script or convert ?

Reply
 
Thread Tools
  #1  
Old 03-28-2012, 12:01 AM
mantra's Avatar
mantra mantra is offline
Senior Member
 
Join Date: Apr 2010
Location: Rome
Posts: 285
Question is there a way to record a script or convert ?

Hi

i understand nothing about script

but is there a way to record a script?
i mean like an action


for example click and select a tool , the hand tool , and let photoshop write the script (that have the command to select the hand tool)

or is there a tool to convert an action to a script?

thanks
cheers
Reply With Quote top
  #2  
Old 03-28-2012, 12:48 PM
Der_W's Avatar
Der_W Der_W is offline
Senior Member
 
Join Date: Jul 2009
Location: Germany
Posts: 558
Re: is there a way to record a script or convert ?

Hi mantra,

yes, there is a way, but it creates really huge scripts and of course you can't record some of the interesting things like loops etc.
What you need to do is go to your "Adobe\Adobe Photoshop CSX\Scripting\Utilities" folder and copy the file "ScriptListener.8li" to "Adobe\Adobe Photoshop CSX\Plug-ins\Automate".
Now restart Photoshop and it'll automatically record everything you do and place the script on your desktop. When you don't need the functionality anymore, just put a "~" in front of the "ScriptListener.8li" inside your "Automate" folder.
And you probably need to clean your script of junk, e.g. opening and closing particular files, if you want it to run on multiple images.
Reply With Quote top
  #3  
Old 03-28-2012, 02:21 PM
capice capice is offline
Senior Member
 
Join Date: Mar 2012
Posts: 178
Re: is there a way to record a script or convert ?

Thanks/Danke Jonas, great tip...gonna give it a try
Reply With Quote top
  #4  
Old 03-29-2012, 12:24 AM
mantra's Avatar
mantra mantra is offline
Senior Member
 
Join Date: Apr 2010
Location: Rome
Posts: 285
Re: is there a way to record a script or convert ?

Quote:
Originally Posted by Der_W View Post
Hi mantra,

yes, there is a way, but it creates really huge scripts and of course you can't record some of the interesting things like loops etc.
What you need to do is go to your "Adobe\Adobe Photoshop CSX\Scripting\Utilities" folder and copy the file "ScriptListener.8li" to "Adobe\Adobe Photoshop CSX\Plug-ins\Automate".
Now restart Photoshop and it'll automatically record everything you do and place the script on your desktop. When you don't need the functionality anymore, just put a "~" in front of the "ScriptListener.8li" inside your "Automate" folder.
And you probably need to clean your script of junk, e.g. opening and closing particular files, if you want it to run on multiple images.
Hi Jonas
thanks
i'm tring to have a short script to load cs5 always with the histogram in rgb mode and not in colors mode

cheers
Reply With Quote top
  #5  
Old 03-29-2012, 11:06 AM
Der_W's Avatar
Der_W Der_W is offline
Senior Member
 
Join Date: Jul 2009
Location: Germany
Posts: 558
Re: is there a way to record a script or convert ?

Following John's advice in your other thread I just recorded a script that'll create a new 1x1px Lab file, which needs to stay open all the time. The next images you open should automatically have the histogram set to RGB.

Quote:
var idMk = charIDToTypeID( "Mk " );
var desc1 = new ActionDescriptor();
var idNw = charIDToTypeID( "Nw " );
var desc2 = new ActionDescriptor();
var idMd = charIDToTypeID( "Md " );
var idLbCM = charIDToTypeID( "LbCM" );
desc2.putClass( idMd, idLbCM );
var idWdth = charIDToTypeID( "Wdth" );
var idRlt = charIDToTypeID( "#Rlt" );
desc2.putUnitDouble( idWdth, idRlt, 1.000000 );
var idHght = charIDToTypeID( "Hght" );
var idRlt = charIDToTypeID( "#Rlt" );
desc2.putUnitDouble( idHght, idRlt, 1.000000 );
var idRslt = charIDToTypeID( "Rslt" );
var idRsl = charIDToTypeID( "#Rsl" );
desc2.putUnitDouble( idRslt, idRsl, 72.000000 );
var idpixelScaleFactor = stringIDToTypeID( "pixelScaleFactor" );
desc2.putDouble( idpixelScaleFactor, 1.000000 );
var idFl = charIDToTypeID( "Fl " );
var idFl = charIDToTypeID( "Fl " );
var idWht = charIDToTypeID( "Wht " );
desc2.putEnumerated( idFl, idFl, idWht );
var idDpth = charIDToTypeID( "Dpth" );
desc2.putInteger( idDpth, 8 );
var idprofile = stringIDToTypeID( "profile" );
desc2.putString( idprofile, "none" );
var idDcmn = charIDToTypeID( "Dcmn" );
desc1.putObject( idNw, idDcmn, desc2 );
executeAction( idMk, desc1, DialogModes.NO );
Reply With Quote top
  #6  
Old 03-30-2012, 12:15 AM
mantra's Avatar
mantra mantra is offline
Senior Member
 
Join Date: Apr 2010
Location: Rome
Posts: 285
Thumbs up Re: is there a way to record a script or convert ?

Quote:
Originally Posted by Der_W View Post
Following John's advice in your other thread I just recorded a script that'll create a new 1x1px Lab file, which needs to stay open all the time. The next images you open should automatically have the histogram set to RGB.
thanks Jonas!!!!
did you use ScriptListener.8li ?

let me understand , you did start photoshop, the script start to record
create a new 1x1px lab file and you did close photoshop

and did you copy and paste the script?
or had you to edit the script

thanks
cheers
Reply With Quote top
  #7  
Old 03-30-2012, 10:12 AM
Der_W's Avatar
Der_W Der_W is offline
Senior Member
 
Join Date: Jul 2009
Location: Germany
Posts: 558
Re: is there a way to record a script or convert ?

Yes, I used the ScriptListener for this as I saw no information on how to set the histogram in the JavaScript reference document.

That's entirely true, I just recorded starting the script, creating the file and closing Photoshop.
The only thing I had to edit was to remove the last part, were I had to close the file, because otherwise that would have been part of the script as well and be quite useless.

Btw. I'm still asking myself, why not create an action to do these exact steps? I mean, basically what the ScriptListener does is create a temporary action and run it, so I don't see much benefit in using a script here
Reply With Quote top
  #8  
Old 03-30-2012, 10:55 AM
mantra's Avatar
mantra mantra is offline
Senior Member
 
Join Date: Apr 2010
Location: Rome
Posts: 285
Re: is there a way to record a script or convert ?

Quote:
Originally Posted by Der_W View Post
Yes, I used the ScriptListener for this as I saw no information on how to set the histogram in the JavaScript reference document.

That's entirely true, I just recorded starting the script, creating the file and closing Photoshop.
The only thing I had to edit was to remove the last part, were I had to close the file, because otherwise that would have been part of the script as well and be quite useless.

Btw. I'm still asking myself, why not create an action to do these exact steps? I mean, basically what the ScriptListener does is create a temporary action and run it, so I don't see much benefit in using a script here
yes i agree with the action
but i though that a short script could set to rgb the histogram without this trick

thanks
cheers
Reply With Quote top
Reply

  RetouchPRO > Tools > Software


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install Golden Crop script in CS5 portable adtechniques Photoshop Scripting 0 03-14-2012 10:36 PM
Photoshop: is there a script to fit crop ? mantra Software 6 03-13-2012 03:42 AM
Settings to use for convert to profile? Caravaggio Photo Retouching 7 10-10-2010 01:51 PM
convert cs/cs2 script for ps7 Nacoya Photoshop Scripting 2 06-23-2006 07:31 AM
I need a Script like a mail merge! clickin Photoshop Scripting 4 02-17-2005 07:23 PM


All times are GMT -6. The time now is 04:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved