Script Drawing Alignment Issue

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

mycort

Script Drawing Alignment Issue

Post by mycort »

kostyanet your exactly right, y1+10 is greater than the thickness of the thinner shape....that's why I need help with making the script account for centering in both thin and thick shapes. I was able to center in the thick shapes but now the thin shape is not. If you or anyone else can help with this alignment issue, it's greatly apprecaited....

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

pfaffenbichler

Script Drawing Alignment Issue

Post by pfaffenbichler »

The amendments txuku proposed seem to work (see image).
I see other issues with the Script, though, as the Pencil settings seem to be taken as they are and might not fit the task.
mycort

Script Drawing Alignment Issue

Post by mycort »

Hi pfaffenbichler,

I saw your attached visual and here's my comment. For "multiple" selections, the measurement alignment was actually already working correctly where it adjusted the center alignment for both thin and thick shapes accordingly. This was already doing this even before txuku's code update.

For single selections.........it's not correctly aligned. If you try only one selection at a time, you will see the problem. Try it, create a single thin selection and run the script. Then create another thikcer selection and run the script....again, just make sure you create these one at a time...you will see that it's still off, even in txuku's updated script.

Can you please explain further with the Pencil settings issue, don't quite understand what you mean. From what I've been using this script, never really noticed an issue with that......the Pencil is meant to give the user options to make it thin or thick.....
pfaffenbichler

Script Drawing Alignment Issue

Post by pfaffenbichler »

Sorry, I missed that.

Have you tried replacing line 116
createMeasure();
with
createMultipleMeasures();
?
Seems to work, but I may again be overlooking something.

As for the Pencil Tool:
As the Script uses the Tool with whatever settings it has the result may look different when run on different stations and times.
If that is irrelevant to you that’s fine.
mycort

Script Drawing Alignment Issue

Post by mycort »

No problem man, for I'm the one who should be sorry for not making it clear in the first place:)

Yeah' I'll try your fix and get back to you. Thing is, it's already working in the multiple measures mode and probably won't be too hard to adapt it to single selections too I'd imagine.....

For the pencil issue, I only use one setting and that's 1px thick and never change this. Same for making pixel specs....any other size is really irrelavant. But when I use the script, I don't find any drawing issues related to the pencil too......thx anyways though.
mycort

Script Drawing Alignment Issue

Post by mycort »

Hi pfaffenbichler,

Tried your code fix on line 116 and it worked!!! it now draws it centered align for both thin and thick.....

Only problem is, it broke another measurement function elsewhere, see my attached file.

Is it possible to just write a simple conditional statement in line 116 to support for maintaining the "createMeasure();" for other measures and one for single measures?

Thx.