Photoshop: Add/Share Actions + Scripts to CreativeCloud Library

  • 4
  • Idea
  • Updated 10 months ago
Would be a comfortable way of getting script updates to coworkers.
Photo of Markus Ast

Markus Ast

  • 1 Post
  • 0 Reply Likes

Posted 3 years ago

  • 4
Photo of Joshua Harwood

Joshua Harwood

  • 2 Posts
  • 3 Reply Likes
@Markus, i have started making Adobe Addons which contain the .atn files. Then sharing the Addon with colleagues. It means i can push updated action files out to all the users easily. Handy workaround until Adobe improves syncing through libraries.

https://www.adobeexchange.com/producer
Photo of John White

John White

  • 4 Posts
  • 1 Reply Like
That is interesting. I don't know much about scripts and how to make and run them, or what the listener (startup) is but that may be something I will have to check out.  We currently have a team around 15 but we grow to 20 -25 at time, so this would be very helpful.  I'm trying to streamline things as much as possible and people make Actions all the time to help out with our processes so to a central location where we can have people update their Actions automatically would be so helpful.  
Photo of Max Johnson

Max Johnson, Champion

  • 450 Posts
  • 208 Reply Likes
Thanks for the in depth post Pedro! I hadn't considered adding a startup script. Could you please explain how you got it to run at startup? Is it a CEP extension or something like that?

I am pretty sure you can get the location of the Creative Cloud Files directory from the CEP/Photoshop api, so that could be another good place to transfer file updates to local storage...
Photo of Pedro Marques

Pedro Marques

  • 161 Posts
  • 25 Reply Likes
Hi Max

I don't need any CEP/photoshop api or extension on my team.
I am a plain "off-line" developer using script optimizations for teams:
- studios (lightroom), quality-control (bridge), and photo-editors (photoshop&Bridge)

It doesn't mean I will never develop a inner html extension for my team, but I need time and a long way to go.

To activate a startup listener from photoshop, I just run this code once on photoshop and the nex time it opens, it will run it alone again.

if (BridgeTalk.appName == "photoshop") {
    var myScriptInstall = File("[central folder some where in my team network]");
    app.notifiers.removeAll();   // remove all notifiers and add them again
    app.notifiersEnabled = true; // activate notifiers
    var eventFile = File(myScriptInstall +"/startUpPhotoshopScript.jsx");
    try{ // se tem rede, usa o script de instalação da origem, se não usa o da pasta Farfetch:
        if (eventFile.exists) {
            app.notifiers.add("Ntfy", eventFile); // each kind of notifier has a code. "Ntfy" is on photoshop restart
        } else {
            alert("Network fail");
        }
    }catch(e){}
}

After running this, verify it by opening File>Scripts>Scripts Events Manager... and it must be there.
Then resart photoshop and the script you defined will run on start event.

I suggest you use the Photoshop script forum to have more accurate answers regarding scripts:
https://forums.adobe.com/community/photoshop/photoshop_scripting
or Bridge Scripting:
https://forums.adobe.com/community/bridge/bridge_scripting
or even CS SDK for APIs, etc
https://forums.adobe.com/community/creativesuites/cs_sdk
https://forums.adobe.com/community/coding-corner

Many answers are already there and can be found.
Photo of Max Johnson

Max Johnson, Champion

  • 450 Posts
  • 208 Reply Likes
Thank you for the code and links! I've been developing tools and scripts for my team in Photoshop, but haven't looked at Bridge scripting before.

I hadn't used the Scripts Events Manager before, but now that you pointed it out, I wanted to share something in there!

Go to File>Scripts>Scripts Events Manager... the dialog will appear...
Set the "Event" dropdown to "everything"
Set "Script" dropdown to "Clean Listener"
Click the "Add" button

Now all the actions you take in photoshop will record their listener properties to a file on your desktop called "Clean Listener.jsx" it looks like this:

#target photoshop
// No handler found for event: 2521::AdobeScriptAutomation Scripts
// No handler found for event: 1936483188:slct:select
// No handler found for event: 1836021349:move:move
// No handler found for event: 1836021349:move:move
// No handler found for event: 1214521376:Hd :hide
// No handler found for event: 1399355168:Shw :show
// No handler found for event: 1936483188:slct:select
// No handler found for event: 1131435084:CpTL:copyToLayer

Which will be invaluable when writing scripts in the future! I can use that to find the event ID to hook onto.
Photo of Pedro Marques

Pedro Marques

  • 161 Posts
  • 25 Reply Likes
There are events and ... inner-events or sub-events
Not all events can be retrieved. 

Lets take one of your examples: 1399355168:Shw :show
TypeID (number): 1399355168
charID( "Shw " ) // always 4 digits/spaces (the space in the end is important)
StringID( "show" )

You can access this same event on photoshop by using one of the 3. They are all the same.
And you can convert all to a number that photoshop understands using:
stringIDToTypeID( "show" )
charIDToTypeID( "Shw " )

More generic events some times need specific triggers. For example, I want to trigger the event when a user creates a colorSampler.
I must use this:
(...)
app.notifiers.add("Mk  ", cstoolEvent, "ClSm");
(...)
The "make" event has nested the colorsampler event "ClSm"

Adobe has some Event ID Codes (still incomplete) in the PDF of photoshop scripting - pag 216:
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop_scriptref_js.pdf

And here - pag 84:
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop_scripting_guide.pdf
Photo of John White

John White

  • 4 Posts
  • 1 Reply Like
I would really love to have the option too to add/share actions to My Library. My department in my company uses a lot of actions and to be to share them via the Library would be a huge help. I could just send new employees or people with new computer a link to my Library and they could in go download all the actions we use. I hope Adobe really adds this.
Photo of Pedro Marques

Pedro Marques

  • 161 Posts
  • 25 Reply Likes
Our actions are stores together in a ATN file in our central folder as I previous described.
The script triggered by the photoshop restart, removes this team Set of actions and reloads it again to make sure everybody uses the last updates. The cade is very simple and we do not use CC Library to store team actions (only few small short term projects).
This avoids the need the editor has to load the last actions set. He just need to restart. 
It is possible to load several sets on restart.

If the sets have also shortcuts that conflict with existing ones on photoshop, the existing one prevail, but the action is loaded the same.
 
Photo of John White

John White

  • 4 Posts
  • 1 Reply Like
Thanks so much for the information you have provided here. Looks like I got a lot of homework to do to figure out how to type up those scripts and make sense of them.  Coding like that isn't something I excel at currently but it looks like it's time to learn :) 
Photo of @goodstruggles

@goodstruggles

  • 15 Posts
  • 0 Reply Likes
I agree. This would be incredibly handy. I would love to have action sets for our design team (image treatments, mockups, etc) and (crop actions, wireframe template storage) for the web team.
Photo of @goodstruggles

@goodstruggles

  • 15 Posts
  • 0 Reply Likes
Yes, this would be fabulous! Please consider implementing. :-)