Copy link to clipboard
Copied
Hi scripters;
I have a lot of objects. I need to change it as follows. (Provided that the contents remain the same;)
I would be glad if you can help
Copy link to clipboard
Copied
Not too sure what you are looking for here. The convert shape command converts a single item to a different shape. (1) Can be used to convert text frame to a spline item such as rectangle, oval, polygon. (2) Can be used to convert page items (rectangles, spline items, imported page, media items, groups, etc.) to another shape (convert a closed path to an open path, convert rectangle to a rounded rectangle, etc.). Your diagram would indicate combining two items into one as with a group or perhaps embedding one item inside another. Please explain.
Copy link to clipboard
Copied
Okay, explain more simply
Copy link to clipboard
Copied
Just For Fun … But Not For Free!
"Tatoo" is the last script I wrote!
The user just selects the "pattern" he created [what he wants! ] and the similar objects he wants to be tattooed! …
[I'll write later a "batch"version with UI.]
… and he plays "Tatoo"!
Even if Tatoo has a global undo, if the user is not satisfied by the result, he can modify the pattern or choose another one:
… and "Tatoo" again!
Of course, "Tatoo" loves simple shapes, ID effects and object styles! …
Best,
Michel, from FRIdNGE
Copy link to clipboard
Copied
Hi,
Sorry about the delay. I think I know what you are looking for now. What you need to do is define a path for the new shape. This takes a little calculation. The shape created by the following is not exactly yours, but I think you can figure it out from there.
--select item to modify before running script
set numPts to 4
tell application "Adobe InDesign CC 2018"
set measurement unit of script preferences to points
set x to item 1 of selection
set gBounds to geometric bounds of x
set bhgt to (item 3 of gBounds) - (item 1 of gBounds) --calculate box height
set bf to bhgt / (numPts * 2) --
set z to entire path of path 1 of x --path points of original rectangle
set bx0 to item 1 of item 3 of z --bottom right x point of original
set by0 to item 2 of item 3 of z--bottom right y point of original
set edgePts to {{bx0, by0}} --set up list for points on right edge
repeat with i from 1 to numPts
set by0 to (by0 - bf)
set thisPt to {bx0 - bf, by0}
set end of edgePts to thisPt
set by0 to (by0 - bf)
set nxtPt to {bx0, by0}
set end of edgePts to nxtPt
end repeat
set newPath to {item 1 of z, item 2 of z} & edgePts --define the path points
tell x
set entire path of path 1 to newPath --create the new shape
end tell
end tell
Copy link to clipboard
Copied
I don't know and do not use [as] @S Hopkins.
thank you...
Copy link to clipboard
Copied
@Michel [FRIdNGE] that's exactly what I want! great job.