• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Create Grid Rectangles inside selected area ("BUG")

Engaged ,
Jan 31, 2019 Jan 31, 2019

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

TOPICS
Actions and scripting

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 31, 2019 Jan 31, 2019

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 = (

...

Votes

Translate

Translate
Adobe
Community Beginner ,
Jan 08, 2022 Jan 08, 2022

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 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2022 Jan 08, 2022

Copy link to clipboard

Copied

Here is my result, works for me:

 

random.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2022 Jan 08, 2022

Copy link to clipboard

Copied

Last script works, but it fills selection with only one random colour.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2022 Jan 08, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2022 Jan 08, 2022

Copy link to clipboard

Copied

By last I mean last post with a script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2022 Jan 08, 2022

Copy link to clipboard

Copied


@Kukurykus wrote:

By last I mean last post with a script.


 

Well now I'm totally confused!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2022 Jan 08, 2022

Copy link to clipboard

Copied

I'm talking about the latest update you did as separate post under the one of previous.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2022 Jan 08, 2022

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2022 Jan 08, 2022

Copy link to clipboard

Copied

I'm not moderator: 9 hours ago

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2022 Jan 08, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2022 Jan 08, 2022

Copy link to clipboard

Copied

LATEST

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines