Jump to content

Script


Bitte

Recommended Posts

I try to make a script that can duplitace an image into - in this case - 72 layers incl. the first one.

 

I put an image in the first square and then run my script.

 

But the round bead becomes an oval bead when the script dupl. the image.

 

The document is 900 x 800 pxl and the square (grid) 100.

 

Any idea what i am doung wrong ?

Link to comment
Share on other sites

You are trying to make the script from scratch?

 

What is the script copying? What command is it using in order to paste the image into subsequent spots?

 

Since the first image is round, why do you need the 72 copies of it? Are they going to show some variations? or rotations?

Link to comment
Share on other sites

Yes i try to make a script duplicating and then i' m going to make a script turning each image in degrees.

 

When i started recording i used Ctrl +C and then CTRL + E.

 

They are going to show different  rotations.

 

The image i show was just a test with a round bead.

Link to comment
Share on other sites

I am still unsure why the round bead, once copied and pasted becomes oval. You are using Ctrl-E which is Paste as a selection. Maybe that is distorting? But how did you get to paste in each individual locations? Also, why not use a regular Paste as a new layer?
Link to comment
Share on other sites

  • 1 month later...

Now i have tried several times not using  Paste + E but the problem is back.

 

I  thought it might be when i start with grid and snap to grid så i tried only with grid but the same happens.

 

This is how i do:

 

Start with  a document 900x800 pxl and grid 100. I place a dot  in the upper left square.

 

Now i start  the scipt.

 

In layer i rightclick >duplicate and mowe the dot   until all squares has a dot.

 

I stop the script.

 

When i try the script i put an oval -  this time  - in the upper left square and then start the script. Then every oval becomes larger almost round and fill up  each square.

 

I wrote about my problem again thinking perhaps someone had the sam problem and found out how to do.

 

I' m a bit lazy  so i would be happy to find aout a way to use the script for duplicating.

 

 

Link to comment
Share on other sites

I use the move tool.

 

This time the dot was made with a brush - just an easy way when i try to find out what the problem is.

 

I have tried vector shapes and not vector.  I have tried using tubes too.

Link to comment
Share on other sites

At which step is the shape changing size?

 

Have you tried running the script with single step to see exactly when it happens? You can find that under File > Script > Single Step. That will then require you to say OK for EVERY single step before it continues, so that you can really see what is the next step, and what the result is before and after each of those steps. This is a common troubleshooting trick.

Link to comment
Share on other sites

I see a couple of things that MIGHT be an issue.

 

1- do you have the Snap to guides active? When you recorded the script, did it snap to those guides?

 

2- I see you are using the Pick tool. Can you try using the Move tool instead?

 

 

Link to comment
Share on other sites

I didn' t have snap to guide active.

 

It seems that pick tool was the problem. Now I have tried several times with mowe tool without any problems. I have redone the duplicate script several times just to find out if everything works just fine.

 

Thank you so much for your help.

Link to comment
Share on other sites

That was my guess when you posted those single steps. If you open the script, you can see that the Pick tool includes coordinates for the nodes, so if you recorded the script with the nodes specific to one particular element/shape, the script will reuse the same ones, no matter what shape/element you are using next. Yes, a little detail that can throw one off when coding!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...