rectangle selection marquee tool and ?

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

choiceimport

rectangle selection marquee tool and ?

Post by choiceimport »

I'm not sure if this is the place to be but I was wondering if a script is available.
Using the, rectangle selection marquee tool, if you could select multiple selections
and then use a script to show the width and height for each selection without the use of the info panel and or the little info box
that is attached to the mouse.

Also is it possible to drag out guides, un-click and then the x and y info is also visible with an info box next to the guide, instead of the info panel.

does this make sense.

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

pfaffenbichler

rectangle selection marquee tool and ?

Post by pfaffenbichler »

Using the, rectangle selection marquee tool, if you could select multiple selections
and then use a script to show the width and height for each selection without the use of the info panel and or the little info box
that is attached to the mouse.
I recommend not using the Rectangular Selection Tool but the Rectangle Tool (set to »Path« instead of »Shape« or »Pixels«) instead.
Getting the coordinates from the resulting PathItem’s SubPathItems directly would be easier, because with a multi-segmented Selection one would probably have to use a makeWorkPath-workaround anyway to get the information.
Mike Hale

rectangle selection marquee tool and ?

Post by Mike Hale »

You can use app.activeDocument.selection.solid to tell if multiple areas are selected( or if the selection contains unselected, holes, areas ) but that's about it. selection.bounds will return the bounding box of all the selected area.

As suggested, paths are a way to get around this limitation. Each of the selected areas will be a subPath item. You can get the bounds of those areas by getting the anchor points from the subPaths.

But even then you can't script a HUD or tooltip like display box near the mouse. Or at least I don't know of a way to do so.
pfaffenbichler

rectangle selection marquee tool and ?

Post by pfaffenbichler »

I had never noticed app.activeDocument.selection.solid; good to know!
choiceimport

rectangle selection marquee tool and ?

Post by choiceimport »

Where is the app.activeDocument.selection.solid?
How do i use it?

Is there another way this could be scripted? Maybe with solids or something.
pfaffenbichler

rectangle selection marquee tool and ?

Post by pfaffenbichler »

app.activeDocument.selection.solid naturally applies only if the active document has an active Selection.

Once again I recommend using the Rectangle Tool.
With »Solids« I assume you mean Solid Color Layers or Shape Layers – those could be used, but again the Rectangle Tool would seem the Tool of choice to create the Vector Masks for those.

And like Mike I don’t know of a way to really interactively display the information; one could get an alert or create (text) layers that display the information, I guess.
choiceimport

rectangle selection marquee tool and ?

Post by choiceimport »

Ok, I just tried "pfaffenbichler's" method.

So I used the rectangle tool with Path/selection options. Then I used the Direct Selection Tool, made a selection and then looked at the info panel.
To make it faster I made an action, to make a selection after using the Direct Selection Tool to get the info. That seemed much much better
process and faster.

So here is another question. Since the rectangle tool "outlines" are grey is it possible to have it another color or three.
So you make two boxes with the rectangle tool, then you can have a script to color them.

It would be nice to have colored paths. any thoughts?