Copy link to clipboard
Copied
I've been thinking about how to do this for a few days, what formula to use, I can't find a solution, my question is this, let's take an example: I have a 6000px document and I have 3 or more vertical lines, what could be the formula that positions them across the entire width of the document? I'll give an example if the document is 6000px divided by 3 it comes out 2000px then automatically the lines I created will move the first to 2000px the second to 4000px the third to 6000px, second example: if there are 4 lines, the first line is positioned at 1500px, the second at 3000px, the third at 4500px, the fourth at 6000px. I hope someone has a formula for this.
You can take a look at this action, which should work for any quantity of vertical lines. You can convert it to batchPlay UXP code if you like, but there are of course going to be more efficient ways of scripting this than directly converting an action.
Copy link to clipboard
Copied
Please upload a couple of sample PSD mockups or at least a screenshot of the main document window with the layers panel and properties panel visible with one of the line layers selected.
Copy link to clipboard
Copied
This is what I would like to do
before
afret
link psd
https://www.mediafire.com/file/wr5s1dtflwmhjrs/psd.zip/file
Copy link to clipboard
Copied
Is that sample file truly representative of the working files?
A flattened Background layer with vector line tool path layers?
That's it, no other layers, or groups or artboards etc?
If so, what is the expected start point for automation? Such as first manually selecting all line layers? Or are no layers selected or only the Background layer selected and not the lines?
P.S. How are the lines first created, do you have control over this? For example, could 5 lines be created if you need 3 (two extra temporary "helper" lines)
Copy link to clipboard
Copied
You can take a look at this action, which should work for any quantity of vertical lines. You can convert it to batchPlay UXP code if you like, but there are of course going to be more efficient ways of scripting this than directly converting an action.
Copy link to clipboard
Copied
Stephen I'm not at home When I get back I'll try your method. you are always kind Thank you
Copy link to clipboard
Copied
Perfect, exactly what I was looking for,
Now that I see the action I ask myself a question
How come I never thought of that before
Sometimes the simple things are the best
you're you're always the best.