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

Applescript Creating a graphic rule with multiple anchors

New Here ,
Feb 28, 2008 Feb 28, 2008
What is the syntax for creating a rule such as you would create with the pen tool in CS2/CS3?

I am trying to place a rule around a group of graphic cboxees. I have the anchors for the rule, determined by examining the bounds of the rectangles, but I can't determine the syntax to create the rule.

I'd think something like:
tell application "Adobe InDesign CS2"

tell document 1
tell page 1
make graphic line at beginning with properties {label:"ruleout", stroke color:"Black", stroke weight:2, entire path:{20, 20, 80, 80, 100, 100, 150, 150}}
where the anchors are y,x in the entire path property. I've been trying to get the properties of a line I did create with the pen tool, but can't find the anchors buried anywhere within the properties.

Anyone have a tip?
TOPICS
Scripting
320
Translate
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
Participant ,
Feb 28, 2008 Feb 28, 2008
entire path should be an array of arrays, I believe, where each point is an x,y array.

Does that help?

Dave
Translate
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
Explorer ,
Feb 29, 2008 Feb 29, 2008
LATEST
Hi Tom,

The entire path property is a property of a path, not of a graphic line (or other page item). What you want is probably more like this:

set myGraphicLine to make graphic line with properties {label:"ruleout", stroke color:"Black", stroke weight:2}
set entire path of path 1 of myGraphicLine to {{20, 20}, {80, 80}, {100, 100}, {150, 150}}

Note that myGraphicLine is now a polygon (because it has more than two points).

Thanks,

Ole
Translate
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