Home Technical Talk

Photoshop Scripting

polycounter lvl 8
Offline / Send Message
Mistry10 polycounter lvl 8
Hey guys !

I was wondering if anyone has any photoshop scripting training materials they can recommend.

Replies

  • Junkie_XL
    Options
    Offline / Send Message
    Junkie_XL polycounter lvl 14
    The only thing I've done is recorded Actions...and boy is that useful when the time is needed for it.
  • AshleyTayles
    Options
    Offline / Send Message
    AshleyTayles polycounter lvl 9
    I could use something like that Junkie, mind sharing?
  • sir-knight
    Options
    Offline / Send Message
    sir-knight polycounter lvl 10
    action recording is pretty simple stuff, lots of tutorials for it if you search for them on google. Right know the only thing I use it for is automating batch resizing and running simple filters like sharp/blur mainly for pixel art.

    But basically you can record anything with actions and run them in batch processes.

    because it's so customizable, what exactly do you want to use it for? It's kinda hard to fulfill your request without knowing what you're trying to do.
  • Slum
    Options
    Offline / Send Message
    Slum polycounter lvl 18
    Actions and batch processes are cool, but thats not scripting :)

    good intro: http://www.pstut.com/tutorial-photoshop-scripts-an-introduction.html

    message board: http://www.ps-scripts.com/bb/
  • moose
    Options
    Offline / Send Message
    moose polycount sponsor
    I just used the help docs and did some google searches for stuff when i made a script or two for PS. I used the Adobe site mostly, and help docs.

    One of them converted RGB to ints, and another was figuring out how the "save layers to files.." script worked, so i could comment out the line that added _## to every file. Only problem was then getting a quick way to run it, since i didnt want to get too indepth and make a UI for it. Ended up just making an action that ran a script.
  • Junkie_XL
    Options
    Offline / Send Message
    Junkie_XL polycounter lvl 14
    I could use something like that Junkie, mind sharing?

    Here is a tutorial to get your feet wet.
    http://www.switchonthecode.com/tutorials/photoshop-tutorial-actions

    If you have tedious tasks that need to be done for multiple images, you can record yourself going thru it one time and then map that to a keyboard key, like F2. Stop recording, then just hit F2 as you switch to your other images and it'll run the process of everything you recorded and finish much faster than you could do it by hand.
  • Mistry10
    Options
    Offline / Send Message
    Mistry10 polycounter lvl 8
    Thanks for all the suggestions and advice guys !!
  • nome_sane
    Options
    Offline / Send Message
    Not training material per se but if you haven't already got these defiantly take a look here...
    http://www.adobe.com/devnet/photoshop/scripting/

    pick up the scripting guide and reference for whichever language you want to use. I've only used the JavaScript one but found it really well documented and helpful.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    As Moose and nome_sane said, the Javascript scripting guide in the Photoshop folder is great reference. That's pretty much all I use, plus the occasional google search for Javascript tips.
  • ScoobyDoofus
    Options
    Offline / Send Message
    ScoobyDoofus polycounter lvl 19
    I've written hundreds of actions and taught little classes on PS actions, but never got into scripting. I haven't had anything that really required it yet, but these are good resources! Always something useful & new on polycount...
  • Ryno
    Options
    Offline / Send Message
    Ryno polycounter lvl 18
    If you guys are in production, and don't use Photoshop actions, you must learn how.

    For example, a typical task that you all probably do a zillion times such as copy from your master PSD to resave a smaller tga.

    Create new action, name it
    Hit the record button
    Duplicate your psd image
    Flatten the image
    Re-size to 1024 or whatever
    Hit Stop on the action recording.

    Now any time you need to duplicate and resize from your psd, just run that action. You can even key bind it to F keys if it's something that you do a lot.

    You can group the objects into sets. I've got a set for general tasks, for specific projects, etc. I key bind the ones that I use all of the time, and it saves a lot of time from having to do click in photoshop.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah, I wrote a little Javascript thing that pops up a prompt window for how big you want to resize the image, it defaults to 1/2 the PSD resolution, and if you change it then it saves the preferences in with the PSD so you can repeatedly perform it.
    Not a hugely complicated JavaScript, but certainly more flexible than an Action. But you've gotta start somewhere! :)

    HarlequiN did a similar thing with his vTools scripts, but his is really complex and has tons more options available - I just wanted a very simple and light one, but whatever works ;)
  • tacit math
    Options
    Offline / Send Message
    tacit math polycounter lvl 17
    been meaning to sort out a paint / erase toggle for a while. anybody scripted anything similar in javascript ? or have any specific resources on writing similar switches ?
  • Funky Bunnies
    Options
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    So I figured this might be a good opportunity to learn PS scripting, so I took some functions from one of the gurus online and made a really simple-ass toggle

    the script just toggles between paintbrush and eraser, but only works in CS3 or CS4
    (for any that don't know, dump scripts into program files/adobe/photoshopCS3/Presets/Scripts and it'll be in your scripts list under File->scripts)

    It's really a weird constraint that photoshop doesn't let you use any non-Ctrl or Fkey hotkey for scripts.
    does anyone know if there's a way around this?
  • NZA
    Options
    Offline / Send Message
    NZA polycounter lvl 9
    Has anyone here created a .swf UI for PS javascripts? I've been playing about with Adobe FLEX Builder which makes creating the UI real easy. It's the backend i'm having trouble with. Got a simple setup (for now) so that if you click a button the javascript behind runs - saves out the .PSD as a .TGA in the directory below the current directory.

    Problem is that it doesn't handle errors at all. For example I want it to communicate the fact that you've clicked the button when you haven't got a file open. Or the file it's trying to write to is read-only. etc...

    I've follow the tutorials and ref material and I can't see what is missing. I've tried to find some info about how to setup debuging with Flex and PS but I dunno if you can do it. Has anyone played with FLEX?
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    NZA:
    this video from gotoAndLearn.com might be related to what you do:
    http://gotoandlearn.com/play?id=66
    as far as I understood its mostly the same in the adobe applications (dreamweaver, flash and now photoshop).
    You dont really need flex what matters are the javascript strings that get passed through.

    there is also the photoshop configurator a AIR application (flash at its core) that generates panels for your with a wide range or pre-defined actions
    ishot-1.jpg
    http://www.imaging-resource.com/SOFT/CFG/CFG1.HTM
    you can learn and grab from the visible javascript code that gets assigned to a button each time.
    More about it on the adobe blog:
    http://blogs.adobe.com/jnack/2008/10/introducing_ado_1.html

    anyway the bottomline is that at leats I dont know how to debug the javascript string code in flex,- I assume you will need the SDK tools from photoshop to do that and test every single action you create.
  • NZA
    Options
    Offline / Send Message
    NZA polycounter lvl 9
    Thanks for the reply Renderhjs - yeah I had a go with the configurator it's really cool actually. I might use it to create a custom panel with the tools I use the most. Decided not to go with it for what I am experimenting with tho because it didn't seem like you could place and wire up common components like drop down lists and checkboxes.

    You can create all sorts of UI's really easily in FLEX but it's really fiddly to code. I've got it working now but in order to communicate between PS->FLEX->Javascript you have to create XML messages which are passed and parsed between the two - which is pretty long winded imo *shrug*

    heres a screenshot of what I have:

    3257517263_7bc0affb4e_o.jpg

    The checkbox isn't functioning properly yet but everything else is working. Might make everything a touch smaller try and squeeze more out of the space.
Sign In or Register to comment.