Actually, if I now understand what you're trying to do - after re-reading your posts and looking at the images - which is simply to draw a box on a raster image and type text in it that stays within the box by wrapping, a script is overkill IMHO. If you have your image open, just select the regular Selection tool and draw your rectangle to a satisfactory width. Then just select the Text tool (set the options for left align given that's what your sample images showed) and click with the text tool somewhere inside the rectangle and start typing. To change font, size, color, etc. just select all of the text and make the changes in the tool options bar. You're not really going to save steps with a script because you still have to have a selection tool to draw your selection (one click and draw) and then just one click to select the text tool.terrypin wrote:Thanks, I’ll try that tomorrow.
You don't necessarily need to use the preset shapes rectangle if it's only a rectangle you want because text will be constrained within a raster selection also. You can even use the Freehand selection tool to outline/draw an irregular shape and the text will be constrained within it.
Also, in my experience, you don't need any particular height to box as long as it's high enough to click inside it with the Text tool, even if your font size won't actually fit within the height of the rectangle. As you type the text will stay constrained within the width of the rectangle but will continue to overflow the bottom, but with a rectangular box at least that doesn't matter. My experience is that the text will still wrap as if the overflow words were within the marching ants of the rectangle. In fact, once you type even one letter inside the box you could change tools, deselect the rectangle, double-click the text object layer in the Layers palette (or right click and select Edit Text from the context menu) and go back and then start typing letters where you left off and the words still stay constrained within the width of the original rectangle. But you can stil type as much as you want to, extending the length of the document vertically as much as you want. I haven't tested what would happen with an irregular shape.
