March 11, 2008
Quick script idea for faster slicing
The initial idea
A Photoshop script that cycles through all of your layers, determines whether a layer is a text layer, if it is, it appends the text into a text file. Each part of the ‘output’ is separated by a line break. Why? So you don’t have to tab to Photoshop a thousand times to get all the text from the design to the slice.
I’d pay for something like this.
Textexport by Bramus
Colleague Johan asked whether someone could knock up a script which exports all text layers from a Photoshop document to a text file. Since I’ve scripted Photoshop before (heck, I even steered Photoshop from within C#) it was no biggie for me to knock up a simple script, which I dubbed
TextExport.
Download the script at Bram.us.
Colleague Johan
How much?
March 11th, 2008 at 3:49 ∞Will take a peek at it in the weekend. Isn’t that hard.
March 11th, 2008 at 9:19 ∞Wolf, your script is ready. Time to testrun tomorrow on Mac ;)
March 11th, 2008 at 10:01 ∞Sweet!
March 11th, 2008 at 10:04 ∞How ’bout copying to the clipboard instead of to a file. Files = clutter. :)
March 11th, 2008 at 10:41 ∞Maybe but you’re going to need to sort the data out anyway… still you can copy it to the relevant .html file directly then. *Adds to wishlist*
March 11th, 2008 at 10:45 ∞Here we go: Textexport 1.2 ;)
March 12th, 2008 at 12:15 ∞Gonna test Bramus’ script but it looks like it’s a lot better :) will replace the one in this post with a link to that.
March 12th, 2008 at 8:23 ∞[...] Johan asked whether someone could knock up a script which exports all text layers from a Photoshop document to [...]
March 16th, 2008 at 2:07 ∞I am writing a text exporter for PS, so I surfed web and found yours.
the thing is….I need to get every character in a text string, and write each character as ASCII to a text file.
I tried constants PrintEncoding and SaveEncoding, but no luck
got any suggestions?
thanks
March 22nd, 2008 at 11:55 ∞I would suggest going over to Bramus. Maybe view his source for the script, ask a question in the comments.
March 23rd, 2008 at 12:07 ∞