I made a Photoshop script to auto-insert dialogue

Dex-chan lover
Joined
Aug 16, 2020
Messages
132
I made, or rather, got ChatGPT to make a Photoshop script to auto-insert dialogues into a layer. This script was tailor-made for my workflow, which all pages are stacked into their own layer as smart objects, where I do all the cleaning/redrawing and typesetting, in one PS document. I simply just got tired of copy pasting every single dialogue into every single text box, and I thought, "why don't I just use technology to do this for me?" And, thus, this script was born.

Now, as a disclaimer, I am not an expert programmer. I have minimal experience in coding (I took a C++ course few years back. This script is in JavaScript). ChatGPT did all the coding, and I just tweaked it some minor things to make it work. I only did this as a proof of concept.

What the script do: it'll bring up a window where you can select a font and font size, and it'll list all smart object layers where you can insert text inputs to be put into that layer. You can add or remove text inputs for each layer. Afterwards, it'll go through each smart object layers in order and automatically add your text, in text paragraph form (meaning in a text box rather than point text), in individual text layers in your selected font and font size and stack them on the center of the page. The order of text layer will follow your text inputs, so your top input will be your top layer. The text layers are automatically set to center justification, hyphenation on, and anti-aliasing smooth.

ZMqgngn.png


Limitations: The biggest problem I had with this script was the scrollbar. I could not make it to work properly nor could I make the panel dynamically bigger as you add more text inputs. Therefore, I just made the panel as big as possible. So, depending on the amount of text you need, you might not have enough space. Also, you cannot scroll using the scroll wheel for some reason and navigating with the scroll bar keeps jumping back to the start. So, to navigate, you gotta click the up and down arrows of the scrollbar. Also, I have no clue if this works on mac or other photoshop versions. I'm currently using ver. 25.6.0.

How to use: To start, in my workflow, use the script "Load Files into Stack..." in File > Scripts. It should be installed with Photoshop. Then, make your working layer into a smart object, go into it, and do your usual cleaning and redrawing, until every layer is a smart object. (SMALL TIP: Alt clicking the visibility will turn off visibility of all other layer). Then, download the script if you haven't. Next, go to File > Scripts > Browse..., and navigate to the script. If you want to add it to the script window and be able to shortcut it, you have to put the script into C:\Program Files\Adobe\Adobe Photoshop XXXX\Presets\Scripts. Also, if you want to skip a layer, simply have an empty input, and the script will skip that layer without adding anything. To export your layers, just go to File > Export > Layers to Files...

Conclusion: So, I bet you have some questions. Is it efficient? I don't know. Is it better than manually adding the dialogues? Maybe. Does it magically typeset every dialogue to their respective bubble. No, you still have to do that yourself. I tested it only once with one chapter which was about 180 lines over 30 pages, but it works (I think). I made this out of pure spite of being absolutely tired of copying pasting... Now, you have to copy paste mind-numbingly to a horrible UI. My next ideas were to make a script reading a spreadsheet or analyzing a whole text file, but my brain is already fried from wrestling with ChatGPT with this script. Anyone is free to edit this script and make it better. No, please make it better!

For now, I'll be trying to use this for future chapters until I find it's absolutely useless or a godsend.

Script: https://drive.google.com/file/d/1qcyoqV3x0POO0kppv53b9zO8NOCtjdyW/view?usp=drive_link
 
Group Leader
Joined
May 25, 2019
Messages
565
What about TyperTools? It seems to cover mostly the same use cases, just slightly different workflow.
 
Dex-chan lover
Joined
Aug 16, 2020
Messages
132
What about TyperTools? It seems to cover mostly the same use cases, just slightly different workflow.
You know... I never thought of actually looking for existing tools... This idea just came up to me and I thought it seemed feasible, so I did it. My work wasted... Though, my idea was to automate the copy pasting, then edit. This one create an entire tool dedicated to typesetting which is pretty cool. Oh well, I'll try it out. Thanks!
 

Users who are viewing this thread

Top