ScriptMaster XT

Discuss AppleScripting for QuarkXPress 10, 9 & 8 (and before)
Post Reply
Vincent Nicolas
Posts: 0
Joined: 13 Apr 2011, 09:55

ScriptMaster XT

Post by Vincent Nicolas » 19 Apr 2011, 21:09

Hello,
Anyone as the ScriptMaster XTension ?
if so... can you just create a Bzier shape with 4 points and tell me what is the applescript code is, please?
Regards,
V. Nicolas

Jean-Marie Schwartz
Posts: 1174
Joined: 23 Nov 2004, 04:30

ScriptMaster XT

Post by Jean-Marie Schwartz » 19 Apr 2011, 22:52

Hi Vincent! No need of ScriptMaster XT to get what you want. Just run a get properties of current box while a shape as you wish is drawn and selected in your file. You get all the info you need to make then a similar shape.
Here is what I got (I'm sorry I stopped at 3 points[:)]
tell application "QuarkXPress8"
--get properties of current box
tell document 1
make new graphic box at end with properties {box shape:polygonal, polygon points:{{"87,561 mm", "44 mm"}, {"103,376 mm", "69 mm"}, {"105,284 mm", "47,141 mm"}}, bounds:{"86,777 mm", "34,212 mm", "108,114 mm", "71,371 mm"}}
end tell
end tell


HTH.
EDIT: Oh! you don't even need the bounds to be set! And I haven't investigate further as to see how Quark would react if the points are not "logical". Play with it and enjoy!

Vincent Nicolas
Posts: 0
Joined: 13 Apr 2011, 09:55

ScriptMaster XT

Post by Vincent Nicolas » 20 Apr 2011, 03:24

Thanks for your quick info, it really help.
What you mean is after drawing something in Quark, you call an applescript that has the applescript code has something like "get proprieties of current box" and the "answer" is shown in the applescript editor?
I was looking for "symmetrical point" and "smooth point" instead of "corner point".
But I am really interested in your process how to get applescript code, can you please make a little step-by-step, that would be nice.
Kindly Regards
Vincent

Jean-Marie Schwartz
Posts: 1174
Joined: 23 Nov 2004, 04:30

ScriptMaster XT

Post by Jean-Marie Schwartz » 20 Apr 2011, 03:44

Vincent Nicolas wrote:I was looking for "symmetrical point" and "smooth point" instead of "corner point".
But I am really interested in your process how to get applescript code, can you please make a little step-by-step, that would be nice.
First of all, I (almost) never use Bzier tool nor am I scripting it. So what I did is simply draw a box in a Quark doc and run the line that is commented in the code I gave you earlier. Test it yourself. Draw what you actually want in a Quark doc and keep it selected. Then run the line "get properties of current box". In the Script Editor, you'll get the results. (You can also run "set my_props to properties of current box" so they are stored in my_props variable.) From there, you just take out the info you need. In this case, you need the kind of object you want to make and the polygonal points (or whatever). I haven't played with it so I don't really understand what those polygonal points are (I haven't tried to make a brand new one - just copied the values I got from "get properties"). Does this make sense?

Post Reply

Return to “QuarkXPress 8, 9 & 10: AppleScript”