Sorry for the late reply, but I ran out of time. So I did the editing by hand so I could finish on time.
But now that I have some time again, I will deal with it again at the beginning of next year.
Unfortunately, your revised script didn't work for my purposes, because I don't want to create a new document, but want to apply the script to an existing document.
In addition, the script always shifts the graphics by the same value. I need to be able to determine the Y position of each graphic individually. That's why I used an array in my script.
Nevertheless, thanks again for your help. Unfortunately your script style is very difficult for me as a script beginner to understand.
Insert image in Photoshop
Re: Insert image in Photoshop
Make sure your document has 72 dpi, then replace:
to:
and:
to:
Code: Select all
dcmnt = documents.add(500, 500, 72)
Code: Select all
y = [20, 50, 180, 210], dcmnt = activeDocument
Code: Select all
dcmnt.selection.select([[30, x1 += 20], [51, x1], [51, x2 += 20], [30, x2]])
Code: Select all
shft = y.shift(), dcmnt.selection.select([[shft, x1 += 20], [shft + 21, x1], [shft + 21, x2 += 20], [shft, x2]])