Copy link to clipboard
Copied
Hello!
I found in this old post a very useful script written and updated by the brilliant Chuck Uebele
Re: Create Grid Rectangles inside selected area
I decided to create a simple user interface, with row controllers, columns and the size of the space between rows and columns, only today that I noticed an unpleasant failure when the number of rows is different from the amount of columns.
Chuck Uebele, could you check out this video?
Could it be possible to circumvent this failure?
Here is the project as it was last updated:
https://pastebin.com/raw/xQ6ewGnn
Any help is valid! Thank you
In line 16, the original script had row as the last variable. It needs to be column. Same with line 17, but it should be row. The below script works.
...#target photoshop
var row = 2;
var column = 3;
var lineSize = 15 //new
app.preferences.rulerUnits = Units.PIXELS; //new
if(app.documents.length>0){
var doc = activeDocument;
try{
var sBounds = doc.selection.bounds;
var lineAdjW = lineSize/row
var lineAdjH = lineSize/column
var sWidth = (
Copy link to clipboard
Copied
I AM PLAYING SCRIPT FRO ESTK Still this issue is there YOUR NEW SCRIPT NOT WORK , FIRST SCRIPT WORK BUT BOX IS BLACK , I WANT TO CREATE BOX IN DIFFERETN COLOR . YOUR LAST SCRIPT IS NOT WORK
Copy link to clipboard
Copied
Here is my result, works for me:
Copy link to clipboard
Copied
Last script works, but it fills selection with only one random colour.
Copy link to clipboard
Copied
That is strange, as you can see from the screenshot I'm not seeing that.
EDIT: Just tested both the script with and without GUI yet again, the code is working fine for me. Each tile has a separate discreet colour. Although random does not guarantee unique, it would be like winning Lotto to have all tiles with the same random colour.
Copy link to clipboard
Copied
By last I mean last post with a script.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I'm talking about the latest update you did as separate post under the one of previous.
Copy link to clipboard
Copied
I don't now what is going on, I tested both the script with and without GUI yet again, the code is working fine for me. If you know what the problem is, please just come out and say it, or modify the code in my post. This is going nowhere fast!
Copy link to clipboard
Copied
I'm not moderator: 9 hours ago
Copy link to clipboard
Copied
Ah, you are referring to a totally different script that I posted 9 hours ago.
That script is only posted as an example of how to change the solid fill layer name to the values used in the solid fill, just in case somebody wanted to take things "one step further". It is only intended to make a single solid fill layer, not multiple. The point of that exercise was retreiving the RGB fill data and using it to rename the layer.
I have not used that code in either of the two scripts being recently discussed, they use the standard layer name.
So all is indeed OK.
P.S. I thought that you had edited code in the forums posted by others in the past, such as when square bracket [i] variables in for loops were dropped in the forum software change, so I thought that you were a moderator. My mistake.
Copy link to clipboard
Copied
Yes, but earlier you could miss out 'new' context of my answer to this post: 2 hours ago
That's true, as moderator I was fixing those lacking [i] chunks, but that function was taken out from me. I think you are ideal person to be moderator for 'Actions and scripting' area, all the more there's no currently other ACP over here to do some little tasks on regular basis, for example ones you find in: Label needs to be changed
If you are interested to be granted by moderation rights contact me privately...