Adobe Script Tutorial 10 Photoshop Scripting Listener Plug-in

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 มิ.ย. 2022
  • Part ten of the series we explore Photoshop Scripting Listener, which records events in Photoshop and generates JavaScript code to perform the tasks recorded.
    Get example code: www.marspremedia.com/download...
    IMPORTANT UPDATE
    =================
    As many users of Apple Silicon Macs are learning, Scripting Listener Plug-in is not compatible with the new chips, only older Intel CPUs. Consider another tool that can convert Actions to JavaScript.
    sourceforge.net/projects/ps-s...
    You don't need all of it. Look in the "apps" folder for "ActionToJavaScript.jsx"
    Copy that JSX to your scripts folder and run it. Select an Action and where to save the code. I actually use this now instead of Scripting Listener Plug-in. It works on my M1 Mac Studio Photoshop 2023 and 2024.
    SCRIPTING LISTENER
    ==================
    Adobe Downloadable plug-ins & content Photoshop:
    helpx.adobe.com/photoshop/kb/...
    Get the ScriptingListener plug-in package:
    macOS Photoshop 2020 and later:
    helpx.adobe.com/content/dam/h...
    macOS Photoshop 2019 and earlier: Scripting Listener Plug-in for macOS
    download.adobe.com/pub/adobe/...
    Windows:
    download.adobe.com/pub/adobe/...
    PHOTOSHOP SCRIPT "PROCESS FOLDER":
    ==================================
    Get the script: www.marspremedia.com/software...
    How to install Photoshop scripts macOS: • Photoshop Scripts How ...
    How to install Photoshop scripts Windows: • Photoshop Scripts How ...
    More about installing scripts both macOS and Windows: www.marspremedia.com/software...
    Other useful scripts for Adobe Creative Cloud applications: www.marspremedia.com/software
    OTHER RESOURCES
    ================
    Visual Studio (VS) Code: code.visualstudio.com/
    ExtendScript Debugger: marketplace.visualstudio.com/...
    How to install Illustrator scripts macOS: • Illustrator Scripts Ho...
    How to install Illustrator scripts Windows: • Illustrator Scripts Ho...
    How to install InDesign scripts macOS: • InDesign Scripts How t...
    How to install InDesign scripts Windows: • InDesign Scripts How t...
    How to install Photoshop scripts macOS: • Photoshop Scripts How ...
    How to install Photoshop scripts Windows: • Photoshop Scripts How ...
    More about installing scripts both macOS and Windows: www.marspremedia.com/software...
    Other useful scripts for Adobe Creative Cloud applications: www.marspremedia.com/software
    EXTENDSCRIPT RESOURCES
    InDesign ExtendScript API
    www.indesignjs.de/extendscript...
    Photoshop ExtendScript API
    www.indesignjs.de/extendscrip...
    Illustrator Scripting Guide
    ai-scripting.docsforadobe.dev/
    JavaScript Tools Guide
    extendscript.docsforadobe.dev/
    ScriptUI for dummies
    creativepro.com/files/kahrel/...
    (PDF) Adobe Creative Cloud JavaScript Tools Guide
    download.macromedia.com/pub/d...
    (PDF) Illustrator CC Scripting Guide
    www.adobe.com/content/dam/aco...
    (PDF) Illustrator CC Scripting Reference JavaScript
    wwwimages.adobe.com/content/da...
    (PDF) Illustrator Scripting Guide (2021)
    readthedocs.org/projects/illu...
    (PDF) Photoshop CC Scripting Guide (2013)
    wwwimages2.adobe.com/content/...
    (PDF) Photoshop Scripting Reference (2020)
    www.adobe.com/content/dam/aco...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 80

  • @oreides
    @oreides 2 หลายเดือนก่อน +1

    you just saved my butt. as an artist it's so hard to learn things on the fly, this helps so much!!!

  • @jmgcg
    @jmgcg ปีที่แล้ว +2

    Thank you for the clear explanation. Finaly I understand how Script Listener works

  • @hamishhamilton6923
    @hamishhamilton6923 2 ปีที่แล้ว +4

    Thanks William, I’m looking forward to trying this one. Great video 🤓

    • @wc7
      @wc7  2 ปีที่แล้ว +2

      Great. Let me know how it goes. Thanks.

  • @victor25021983
    @victor25021983 ปีที่แล้ว +1

    designer skill combine with javascript programming skill. cool ..

  • @NorthernAir2020
    @NorthernAir2020 11 หลายเดือนก่อน +1

    That is incredibly useful. I am so glad I found this video. I could kiss you for that, thank you so much.

  • @joviion2040
    @joviion2040 ปีที่แล้ว

    hi william,goood videos,i appreciate you are doing this to share knowledge.I have a doubt,in one of my work i need to segment parts of a car in photoshop,i made some actions,to do this ,but while segmenting i sometimes make a mistake of segmenting right tyre as left and left tyre as right.
    it has created a huge problem for me in my work.Is there any possibility we can write a script in photoshop so that it runs in the active document and finds for the errror if(left tyre is segmented as right tyre and right tyre is segmented as left tyre)
    Is there any possibility we can write a script so that it can run and find for mistake automatically.

  • @nirphotoartjaiminbhavsar6782
    @nirphotoartjaiminbhavsar6782 2 ปีที่แล้ว +3

    Nice sr

    • @wc7
      @wc7  2 ปีที่แล้ว +3

      Thanks. I glad you like it. More to come.

  • @bharamappabandak9226
    @bharamappabandak9226 2 ปีที่แล้ว +3

    Nice sir👌👌👌

  • @haies09
    @haies09 ปีที่แล้ว +1

    If I wanted to make dodge and burn curves and have them placed inside a dedicated group, no matter where you’re in the layers section. Can this plugin do that, or do I have to add certain codes myself?

    • @wc7
      @wc7  ปีที่แล้ว +1

      This plug-in is to record tasks performed in Photoshop that can then be put into script code. If the steps are the same for every image, the resulting code could be a complete script, the same an Action could be a complete solution. But if anything varies, like layer names, or what group a layer is in, etc., other code has to handle that, combined with the result of Scripting Listener.

  • @wc7
    @wc7  ปีที่แล้ว +1

    As many users of Apple Silicon Macs are learning, Scripting Listener Plug-in is not compatible with the new chips, only older Intel CPUs. Consider another tool that can convert Actions to JavaScript.
    sourceforge.net/projects/ps-s...
    You don't need all of it. Look in the "apps" folder for "ActionToJavaScript.jsx"
    Copy that JSX to your scripts folder and run it. Select an Action and where to save the code. I actually use this now instead of Scripting Listener Plug-in. It works on my M1 Mac Studio Photoshop 2023 and 2024.

    • @aidanearl697
      @aidanearl697 10 หลายเดือนก่อน +1

      Thanks for this. Worked for me on an M1 Mac. For those that may not understand. You have to drag that ActionToJavaScript.jsx into your photoshop. A dialog will appear for you to select a folder and an action in that folder.
      Works on the Beta PS also.

  • @arrk8055
    @arrk8055 ปีที่แล้ว +2

    SUPER

    • @wc7
      @wc7  ปีที่แล้ว +2

      Thanks. Glad you like it.

  • @m7medoo204
    @m7medoo204 ปีที่แล้ว +1

    Thank's

    • @wc7
      @wc7  ปีที่แล้ว +1

      You're welcome. Thanks for watching.

  • @kriczkinorbert
    @kriczkinorbert ปีที่แล้ว +2

    Hi, i am new in here. Realy useful video. Thank you! I have an idea for a future video. How to make costume keybord shortcut for action trigger.

    • @wc7
      @wc7  ปีที่แล้ว +1

      Thanks, I'm glad it helps. About the keyboard shortcut, I talk about that in these videos, but it's way at the end of each:
      How to install Photoshop scripts macOS: th-cam.com/video/b_kCiXFTNGk/w-d-xo.html
      How to install Photoshop scripts Windows: th-cam.com/video/ZVYiXP7h6Rw/w-d-xo.html
      It's easy to explain right here. In the Actions list, put the mouse pointer to the right of the Action name, in the blank area (if on the name itself that renames the Action). Double-click and a window opens "Action options" one of which is to assign a function key for the Action. I use this for many Actions I run often. I hope that helps.

  • @treasad1494
    @treasad1494 9 วันที่ผ่านมา

    I am looking for a script to do fore-edge printing on book pages. Do you know how I would find a script for this. And how to use it?

    • @wc7
      @wc7  9 วันที่ผ่านมา

      Try the Adobe User Community. Free to join.
      forums.adobe.com/

  • @kostassfitis4424
    @kostassfitis4424 ปีที่แล้ว +1

    Great tutorial sir, in my case it didn't work though. I wanted to make a script out of a plug-in
    . Is there any way to make a plug-in run as a script? Thanks William!

    • @wc7
      @wc7  ปีที่แล้ว +1

      The Scripting Listener records Photoshop, not other add-ons. No you can't make a script out of a plug-in, other than study what it does and write matching code yourself. Contact the maker of the plug-in to ask if it has an option to be scripted or included in an Action, another way to automate plug-ins.

    • @kostassfitis4424
      @kostassfitis4424 ปีที่แล้ว +1

      @@wc7 Thank you very much for the fast response.

  • @Swain137
    @Swain137 10 หลายเดือนก่อน

    Hello, is it possible to script inserting 2 different images into 2 different smart objects located in 1 picture? And automate the process for bunch of pair pictures?

    • @wc7
      @wc7  10 หลายเดือนก่อน

      Yes it is possible. For each smart object layer, first make a File object for the image to insert. We'll assume that is stored in variable "file". Next find the layer by name and select it. Then run this Scripting Listener code to swap the smart layer contents:
      // Replace contents of smart object layer.
      desc1 = new ActionDescriptor();
      desc1.putPath(charIDToTypeID("null"), file); //

    • @wc7
      @wc7  8 หลายเดือนก่อน

      New video fulfills your request: th-cam.com/video/gbXDpSG7FoM/w-d-xo.html

  • @orangefoxgaming9062
    @orangefoxgaming9062 ปีที่แล้ว +1

    Hello sir how to Photoshop jsx scripts all layer renaming as i decide. Ex: 01,02,03 it renamed should be serial please help me.

    • @wc7
      @wc7  ปีที่แล้ว +1

      Can you confirm what the script should do? My impression is that every layer starting from top and going to bottom be renamed to an incremental number with zero prefix. So top layer gets renamed to "01", next layer down, "02", etc. until reaching the bottom. Will it includes layers in groups? And should group names be included in the numbering? Or ignore groups? (perhaps the images to process won't have groups?). All details you can provide help get it right the first time. Thanks.

  •  ปีที่แล้ว +1

    I try to fill red color of "two" string in "one two three" string (text layer), but it's not working. Can you make a video for this. thanks

    • @wc7
      @wc7  ปีที่แล้ว

      I'm not sure scripting listener can record this, at least not change the color of specific text, without updating the entire text layer. Which means it would always change to the same text used when recorded. I have to investigate before I can say how to do it, if it can even be done.

  • @GhlonhReki
    @GhlonhReki 10 หลายเดือนก่อน

    i want to use script to scroll Brushes Panel scroll Bar to browse brushes during drawing .can pphotoshop scripting api do that ?

    • @GhlonhReki
      @GhlonhReki 10 หลายเดือนก่อน

      i tryed this event lisner it can't recordv Photosohop app UI event .

    • @wc7
      @wc7  10 หลายเดือนก่อน

      Can't script scrolling the UI that I know of.

  • @zhaooskar3178
    @zhaooskar3178 ปีที่แล้ว +1

    I am working on a video file with a logo. For this I import that video into ps (import video frames to layers). Then I need to do content aware fill for each frame.Since the position of the logo is the same, I think this operation could be done by using a script. But I don't know vb javascript... at all. Until I saw your video, I wondered if it could be done with the ScriptingListener plug-in? But I can't, and I hope you can make a tutorial like this. thank you very much! If you need video footage, I can email you. Thanks!

    • @wc7
      @wc7  ปีที่แล้ว +1

      I am not strong in After Effects (print production is my expertise), but I understand After Effects has content-aware fill for video. Other viewers with experience can chime in. I can't see writing a script for Photoshop that tries to reinvent the wheel when a solution already exists.

    • @zhaooskar3178
      @zhaooskar3178 ปีที่แล้ว +1

      @@wc7 sry about the misunderstanding. Actually i imported the video clip into photoshop because the content-aware fill function in AE didn't do a good job. In PS every single Frame was turned into a layer. then i make a selection by using the rectangle around the Logo. Then i do content-aware fill. This has to be done for every Frames. Is that possible make this loop operation automatically by using Script Listener Plug-in or just normal script?

    • @wc7
      @wc7  ปีที่แล้ว +1

      With image open, make a selection. Ensure at least one layer is selected or this will result in error. Then run this script code:
      var doc = app.activeDocument;
      for (var i = 0; i < doc.layers.length; i++) {
      doc.activeLayer = doc.layers[i];
      var desc1 = new ActionDescriptor();
      desc1.putEnumerated(stringIDToTypeID("cafSamplingRegion"), stringIDToTypeID("cafSamplingRegion"), stringIDToTypeID("cafSamplingRegionAuto"));
      desc1.putBoolean(stringIDToTypeID("cafSampleAllLayers"), false);
      desc1.putEnumerated(stringIDToTypeID("cafColorAdaptationLevel"), stringIDToTypeID("cafColorAdaptationLevel"), stringIDToTypeID("cafColorAdaptationDefault"));
      desc1.putEnumerated(stringIDToTypeID("cafRotationAmount"), stringIDToTypeID("cafRotationAmount"), stringIDToTypeID("cafRotationAmountNone"));
      desc1.putBoolean(stringIDToTypeID("cafScale"), false);
      desc1.putBoolean(stringIDToTypeID("cafMirror"), false);
      desc1.putEnumerated(stringIDToTypeID("cafOutput"), stringIDToTypeID("cafOutput"), stringIDToTypeID("cafOutputToCurrentLayer"));
      executeAction(stringIDToTypeID('cafWorkspace'), desc1, DialogModes.NO);
      }

  • @edwardj8185
    @edwardj8185 ปีที่แล้ว +1

    Thank you so much William, i am Edward.
    There is an error message when i tried to use it for Edit > Convert to Profile > Advanced > Multichannel > "Fuji PC1120" Profile.
    Error 8800" General Photoshop error occurred. This Functionality may not be available in this verion of Photshop.
    -The command "" is not currently avaialbe.
    Line: 14
    -< executeAction( idmodalStateChanged, desc45, DialogModes.NO );
    Please let me, what is the problem with script .

    • @wc7
      @wc7  ปีที่แล้ว +1

      I got your website message and replied. The problem is your listener code has two blocks "modal state changed" those are the dialog window opening and closing. Remove those. All you need is the last block with "convert to profile" in the first line.

  • @helenawilsena5821
    @helenawilsena5821 8 หลายเดือนก่อน

    Does Script listener plugin works for Adobe Animate cc?
    Actually i'm a animator and tried hard to automate my workflow. But i'm failed. I dont know how to code. Can you please help me out.

    • @wc7
      @wc7  8 หลายเดือนก่อน

      Scripting Listener is for Photoshop only. There are no similar plug-ins for other Adobe apps that I know of. Animate uses ActionScript, which I am not familiar with. I am familiar with ExtendScript in Photoshop, InDesign, and Illustrator. Sorry I can't be of help to you. I suggest try the Adobe user forum. Free to join. Ask your questions there. Someone will help. community.adobe.com/

  • @CliffStewart-ci8uc
    @CliffStewart-ci8uc ปีที่แล้ว

    The two files of scripting listener log that should be on my desktop is not there. Working on a mac photoshop 23

    • @wc7
      @wc7  ปีที่แล้ว

      Doesn't work with Apple M1 chip version of Photoshop.

    • @wc7
      @wc7  ปีที่แล้ว

      Have a look at this alternate solution. It works on M1.
      sourceforge.net/projects/ps-scripts/files/xtools/
      You don't need all of it. Look in the "apps" folder for "ActionToJavaScript.jsx"
      Copy that JSX to your scripts folder and run it. Select an action and where to save the code. I actually use this now more than Scripting Listener Plug-in.

  • @CompositeNation
    @CompositeNation ปีที่แล้ว +2

    Hello William, I already installed the plugin but it seems not to log any file into my Desktop, I already restarted the computer and it is not working. Do you know why this could be happening? Kind regards.

    • @wc7
      @wc7  ปีที่แล้ว +2

      Not sure. It's always worked for me. Is this macOS or Windows? Do you have the right plugin for the right platform? They are different. Also double-check the plug-in is in the right folder.

    • @CompositeNation
      @CompositeNation ปีที่แล้ว +1

      @@wc7 I've used it for years as well and never had this issue beofre, just upgraded to Windows 11 and I don't know if something is wrong with windows 11.

    • @wc7
      @wc7  ปีที่แล้ว +2

      @@CompositeNation Again not sure. I am not using Windows 11 yet so couldn't say if it is the problem. I would post a question on the Adobe forum -- community.adobe.com/ -- Photoshop section, because the great number of users there maybe someone has encountered the same and solved it.

    • @CompositeNation
      @CompositeNation ปีที่แล้ว +1

      @@wc7 Thank you very much William I already post it on the forums, I appreciate your time!

    • @wc7
      @wc7  ปีที่แล้ว

      @@CompositeNation Also consider another tool that can convert Actions to JavaScript.
      sourceforge.net/projects/ps-scripts/files/xtools/
      You don't need all of it. Look in the "apps" folder for "ActionToJavaScript.jsx"
      Copy that JSX to your scripts folder and run it. Select an Action and where to save the code. I actually use this now more than Scripting Listener Plug-in. Also xtools works on M1 Mac. Scripting Listener does not.

  • @marioazmy6013
    @marioazmy6013 6 หลายเดือนก่อน

    Thanks William
    How to write the daily date on images automatically in Photoshop

    • @wc7
      @wc7  6 หลายเดือนก่อน

      First see tutorial #6 for how to add a text layer: th-cam.com/video/GIZmCp4SuKM/w-d-xo.html
      Instead of simple text, calculate today's date.
      var now = new Date();
      var today = (now.getMonth() + 1) + "/" + now.getDate() + "/" + now.getFullYear();
      Use the value of the variable 'today' in the content of the textItem.

    • @marioazmy6013
      @marioazmy6013 6 หลายเดือนก่อน +1

      @@wc7 thank William

  • @BrandHubz
    @BrandHubz ปีที่แล้ว +1

    I love you voice damn I wish could steal your voice .

    • @wc7
      @wc7  ปีที่แล้ว

      I never thought my voice was anything special. Good enough to get the message delivered. Thank you for the compliment. And thanks for watching.

  • @khuzaj488
    @khuzaj488 ปีที่แล้ว

    does it work with illustrator?

    • @wc7
      @wc7  ปีที่แล้ว

      No.

    • @khuzaj488
      @khuzaj488 ปีที่แล้ว

      @@wc7 Thanks for your quick response

    • @khuzaj488
      @khuzaj488 ปีที่แล้ว

      @@wc7 How to do the same process with illustrator, is there a Illustrator Scripting Listener Plug-in or i have to learn to code

    • @wc7
      @wc7  ปีที่แล้ว

      @@khuzaj488 A similar plug-in for Illustrator does not exist.

  • @012897
    @012897 ปีที่แล้ว +1

    Not working for Photoshop 2023 on Mac..

    • @wc7
      @wc7  ปีที่แล้ว +1

      Plug-in is not compatible with M1 versions of Photoshop. No word from Adobe yet (that I know of) if/when an updated plug-in will be available. If possible to run non-M1 version can use Rosetta and then the plug-in works. More info here: community.adobe.com/t5/photoshop-ecosystem-discussions/scripting-listener-not-working-in-photoshop-2021-for-mac-m1/td-p/12037162

    • @wc7
      @wc7  ปีที่แล้ว +1

      Another solution is xtools. There is one script "Action to JavaScript" that gives similar results to Scripting Listener Plug-in and it works with M1 chip versions of Photoshop. Get it here: sourceforge.net/projects/ps-scripts/files/xtools/

  • @Showbear1986
    @Showbear1986 7 หลายเดือนก่อน

    Not working in Photoshop 2024?

    • @wc7
      @wc7  7 หลายเดือนก่อน

      Intel CPU yes it works. Apple silicon, no. Never was coded for that, and likely never will be with new scripting language rolling out now. See pinned comment and important update in description for solution.

  • @j.c-mtl1150
    @j.c-mtl1150 ปีที่แล้ว

    For me its not working for photoshop 24 , for photoshop 19 works like a charm.

    • @wc7
      @wc7  ปีที่แล้ว

      Are you using M1 Mac? Not compatible with M1 chip version of Photoshop. See other comments for solutions.

    • @j.c-mtl1150
      @j.c-mtl1150 ปีที่แล้ว

      @@wc7 Hi william , thanks 4 your response, im using windows 10.

    • @wc7
      @wc7  ปีที่แล้ว

      @@j.c-mtl1150 Hmm. Not sure what to say. Works for me Photoshop 24.3 on Windows 11 22H2

  • @chauhuynh7326
    @chauhuynh7326 ปีที่แล้ว

    when i run script. I found out this error 8800. executeAction( idtoolModalStateChanged, desc463, DialogModes.NO ); Please help me

    • @wc7
      @wc7  ปีที่แล้ว

      You haven't reduced the log to the lines relevant to the task you intended to record. The plug-in records everything, even things you can ignore. "idtoolModalStateChanged" indicates a window changed focus. You don't need any of these in the final code to use. Re-watch the video. This is explained multiple times.

    • @wc7
      @wc7  ปีที่แล้ว

      Also consider another tool that can convert Actions to JavaScript.
      sourceforge.net/projects/ps-scripts/files/xtools/
      You don't need all of it. Look in the "app" folder for "ActionToJavaScript.jsx"
      Just copy that JSX to your scripts folder and run it. Select an Action and where to save the code. I actually use this now more than Scripting Listener Plug-in. Also xTools works on M1 Mac. Scripting Listener does not.

    • @chauhuynh7326
      @chauhuynh7326 ปีที่แล้ว

      @@wc7 thank you very much

    • @QuynhNguyen-xc8ej
      @QuynhNguyen-xc8ej ปีที่แล้ว

      @@chauhuynh7326 Giải quyết vấn đề đấy như thế nào vậy bác? em cũng bị lỗi tương tự, thử xóa mà cũng k đc.