Copy link to clipboard
Copied
Hi all,
Longtime lurker, first time poster.
I'm looking for a simple script that selects a reference point. You'd be the best person on the internet today if you'll also tell me where to edit it, so I can make another script, to select another reference point. I'll then use the scripts in some actions.
Thanks so much!
Adam
Have you tried setting the reference point as part of your action?
I am on a Mac, and it works for me.
Copy link to clipboard
Copied
… and what to do?
For the beginning: Script to set reference point
Copy link to clipboard
Copied
It’s pretty pedestrian. Moving a placed image into a precise position. My workflow gets all messed up when I start an action that involves moving objects around, and they move into the wrong position because the refern point was wrong.
Copy link to clipboard
Copied
Please describe your workflow in detail. (Did you know you can move objects through scripting?)
Copy link to clipboard
Copied
Here's the gist of two actions I'm most interested in using this for. I'm away from work now, so pardon if that this is what I can recreate from memory. The parts of the action this script would be helpful for are in bold:
Rasterized/fully flattened PDF to client:
*I use a similar action which uses the Rasterize command instead, but for reasons beyond me, it frequently (and inconsistently) produces a PDF with huge portions of the art missing.
Aligner/Duplicator:
Neither of these are life-and-death, but having one less possibility for something to go wrong, or one less thing to think about, would really smooth my day.
Thanks!
Copy link to clipboard
Copied
Place a file:
How can I place image into an .ai file using java?
calculate the middle of width and height of the placed item
calculate the middle of width and height of the artboard
use position property of the placed item to set the new (top and left) position
Copy link to clipboard
Copied
I'm so sorry, I should have been clear at the top: I don't know how to code. I'm specifically asking for a very kind person to write me some Javascript. Thank you again!
Copy link to clipboard
Copied
can you show screen shots showing before and after? I'd like to see what kind of alignment you need
Copy link to clipboard
Copied
Thanks for your willingness to help, Carlos. I stared at the screen for a while today, unsure how to represent what I want to do with screenshots, and then Mike pointed out I don't need a script at all. So no need.
Copy link to clipboard
Copied
no problem, glad to hear you were helped.
Copy link to clipboard
Copied
Have you tried setting the reference point as part of your action?
I am on a Mac, and it works for me.
Copy link to clipboard
Copied
Hey Mike,
I'm amazed—because I thought I'd tried that at the start, and I didn't remember it working—but setting the reference point in the Transform panel did the trick. Thanks for encouraging me to go back to basics!
Copy link to clipboard
Copied
Glad to be of help, Stopped Down.