Copy link to clipboard
Copied
Hi all -
I'm not really familiar with the scripting process, but I am trying to learn! I did a search for this answer but haven't come up with much.
Was wondering if someone could explain how to create a simple script to place a selected object in a specific location. I'd be using this to move a certain object to the top left or right spread in our publication (X: -.25, Y:-.25).
Thanks again!
Copy link to clipboard
Copied
Post in the InDesign Scripting forum here:
Copy link to clipboard
Copied
I assume you are learning JavaScript?
This would move a selected object. The X,Y has to be enclosed in brackets as the move function's parameter. You also have to consider the document's units setting (is it really inches?) and the page's zero point (is it really (0,0)?)
var s=app.activeDocument.selection[0];
s.move([-.25,-.25])
Copy link to clipboard
Copied
Moving to InDesign Scripting forum. The regular forum is busy enough already.
Copy link to clipboard
Copied
Thanks too all, Rob this works perfectly. I appreciate it!
And sorry for the wrong forum location, I'll be sure to post there in the future.
Copy link to clipboard
Copied
Hi joep,
In case you just need a tool without entering the maze of InDesign coordinate spaces, the free version of Equalizer can do the job. Just set the X- and Y- locations once and you're done:
@+,
Marc