Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Photoshop Applescript

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  Looking for Mov2DVparts  
Author Message
Sybil

External


Since: May 12, 2004
Posts: 8



(Msg. 1) Posted: Wed May 12, 2004 7:51 pm
Post subject: Photoshop Applescript
Archived from groups: alt>comp>lang>applescript (more info?)

Hey all,
I'm brand spankin' new to applescript but I have the basics and syntax
down already and I know my way around c++ and actionscripting. Anyhoo, just
wondering if there is any good sites or references for learning
applescripting? So far I have a menu system that allows the user to choose
a source folder and a default name. Then I'd like it to open photoshop and
do a batch process on the source folder. And maybe later on have a progress
bar and code in multiple source directory functionality.
Right now I just don't know what function or keystroke coding gets you
to the toolbar "file" then down to "automate" then over one to "batch..."
THEN after that I would have to set which action to use, set that default
folder in there, and set the correct radio buttons, etc... But I know you
can't tab to get to those options. So would I have to code in mouse
movements to get there?
I'm sure theres a quicker way to get this all done...

Thanks!
Sybil

 >> Stay informed about: Photoshop Applescript 
Back to top
Login to vote
Dave Balderstone

External


Since: Mar 29, 2004
Posts: 507



(Msg. 2) Posted: Wed May 12, 2004 7:51 pm
Post subject: Re: Photoshop Applescript [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Photoshop CS ships with both a scripting guide and an Applescript
reference guide in PDF format. Ethan Wilde's "Applescript for
Applications" (Peachpit Press) has a section on Photoshop (v 5 with
Photoscripter).

djb

 >> Stay informed about: Photoshop Applescript 
Back to top
Login to vote
Sybil

External


Since: May 12, 2004
Posts: 8



(Msg. 3) Posted: Wed May 12, 2004 9:21 pm
Post subject: Re: Photoshop Applescript [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Dave,
I've gone through that reference guide and there is a class for the "web
gallery" and all the options for that but none for the batch process.
I suppose I could make a short cut key for the batch process and execute
that but then how could I set all the options in that window? Or would I
just have to take a longer route and program my own batch process... And for
programs that don't have a shortcut key option how would you get to the menu
options?


On 5/12/04 11:03 AM, in article
120520041103588406%dave@N_O_T_T_H_I_S.balderstone.ca, "Dave Balderstone"
wrote:

 > Photoshop CS ships with both a scripting guide and an Applescript
 > reference guide in PDF format. Ethan Wilde's "Applescript for
 > Applications" (Peachpit Press) has a section on Photoshop (v 5 with
 > Photoscripter).
 >
 > djb
 >> Stay informed about: Photoshop Applescript 
Back to top
Login to vote
Dave Balderstone

External


Since: Mar 29, 2004
Posts: 507



(Msg. 4) Posted: Wed May 12, 2004 9:21 pm
Post subject: Re: Photoshop Applescript [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article , Sybil wrote:

 > I've gone through that reference guide and there is a class for the "web
 > gallery" and all the options for that but none for the batch process.
 > I suppose I could make a short cut key for the batch process and execute
 > that but then how could I set all the options in that window? Or would I
 > just have to take a longer route and program my own batch process... And for
 > programs that don't have a shortcut key option how would you get to the menu
 > options?

I'm not sure if the batch process is scriptable. I usually just use a
repeat loop with a list of files. You could also record a new action
and then call that...

Some things in PShop are scriptable with JavaScript and not AS... But
PShop will generate the javascript code for you. Make sure the
"ScriptingListener" plugin is in "Applications:Adobe Photoshop
CS:Plug-Ins:Adobe Photoshop Only:Automate:" It will create a file on
your desktop called "ScriptingListenerJS.log"

Any actions you do in PShop will be recorded to that file. The code at
the end of the file is the last thing you did.

You can then add it to your Applescript with the "do javascript"
operator.

For instance, here's a script I use to batch "autocorrect" images .
Watch the line breaks...

-----
on open fileList
tell application "Adobe Photoshop CS"
activate
set i to count of fileList
repeat i times
set thefile to (item i of fileList)
open thefile showing dialogs never
tell current document
do javascript "{var id110 = charIDToTypeID( \"Lvls\" );var
desc33 = new ActionDescriptor();var id111 = stringIDToTypeID
( \"autoBlackWhite\" ); desc33.putBoolean( id111, true ); var id112 =
stringIDToTypeID( \"autoNeutrals\" );desc33.putBoolean( id112, true
);executeAction( id110, desc33, DialogModes.NO );}"
if (characters -1 thru -3 of thefile = "JPG") then
save as JPEG with options {embed color profile:false,
matte:none, quality:12} without copying
close without saving
else
save
close without saving
end if
end tell
end repeat
end tell
end open
-----
 >> Stay informed about: Photoshop Applescript 
Back to top
Login to vote
Sybil

External


Since: May 12, 2004
Posts: 8



(Msg. 5) Posted: Thu May 13, 2004 12:57 am
Post subject: Re: Photoshop Applescript [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Dave!
That¹s a lot less work :)

On 5/12/04 2:28 PM, in article
120520041428163850%dave@N_O_T_T_H_I_S.balderstone.ca, "Dave Balderstone"
wrote:
 >
 > I'm not sure if the batch process is scriptable. I usually just use a
 > repeat loop with a list of files. You could also record a new action
 > and then call that...
 >
 > Some things in PShop are scriptable with JavaScript and not AS... But
 > PShop will generate the javascript code for you. Make sure the
 > "ScriptingListener" plugin is in "Applications:Adobe Photoshop
 > CS:Plug-Ins:Adobe Photoshop Only:Automate:" It will create a file on
 > your desktop called "ScriptingListenerJS.log"
 >
 > Any actions you do in PShop will be recorded to that file. The code at
 > the end of the file is the last thing you did.
 >
 > You can then add it to your Applescript with the "do javascript"
 > operator.
 >
 > For instance, here's a script I use to batch "autocorrect" images .
 > Watch the line breaks...
 >
 > -----
 > on open fileList
 > tell application "Adobe Photoshop CS"
 > activate
 > set i to count of fileList
 > repeat i times
 > set thefile to (item i of fileList)
 > open thefile showing dialogs never
 > tell current document
 > do javascript "{var id110 = charIDToTypeID( \"Lvls\" );var
 > desc33 = new ActionDescriptor();var id111 = stringIDToTypeID
 > ( \"autoBlackWhite\" ); desc33.putBoolean( id111, true ); var id112 =
 > stringIDToTypeID( \"autoNeutrals\" );desc33.putBoolean( id112, true
 > );executeAction( id110, desc33, DialogModes.NO );}"
 > if (characters -1 thru -3 of thefile = "JPG") then
 > save as JPEG with options {embed color profile:false,
 > matte:none, quality:12} without copying
 > close without saving
 > else
 > save
 > close without saving
 > end if
 > end tell
 > end repeat
 > end tell
 > end open
 > -----
 >> Stay informed about: Photoshop Applescript 
Back to top
Login to vote
Dave Balderstone

External


Since: Mar 29, 2004
Posts: 507



(Msg. 6) Posted: Thu May 13, 2004 12:57 am
Post subject: Re: Photoshop Applescript [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article , Sybil wrote:

 > ThatÕs a lot less work :)

Less work is a good thing.

djb
 >> Stay informed about: Photoshop Applescript 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
New to Applescript - Hello, I'm brand new to Applescript - I've done a lot with VBS but never touched Applescript. Are there some good script repositories online? AppleScript Editors? Manuals? Any help will be greatly appreciated!!! TIA, Bill bill@2burkes.com

Applescript RSS - Is there any way to acquire an RSS feed using Applescript? I'd like to be able to specify the RSS URL, then have Applescript consume the most recent 5 entries. Thanks, A

Use applescript in Keynote - Am trying to use applescript to modify the color of a selected text element on a slide in Keynote. is it possible to have a script that can set the font, size, color of a selected text in keynote using applescript. The dictionary mentions about a..

AppleScript 2.2 (Lion) - Hello, Lion's AppleScript is version 2.2. Apple has yet to make the release notes available, but some new features are presented here: http://www.macosxautomation.com/lion/index.html Patrick -- Patrick Stadelmann <Patrick.Stadelmann@unine.ch>

Leopard, Firefox & Applescript - Can anyone tell me why a script I wrote to log in to my bank no longer works in Firefox since I installed Leopard? Can it by fixed? Thanks
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]