Swap Two Items on Your InDesign Page
Ray asked:
I’m wondering if there’s a way to swap two objects on a page without clicking and dragging to resituate them on the page?
I originally responded to Ray with a “sorry, no.” But then a little script caught my eye! Marc Autret (a.k.a. Amar Cutter) posted a little script on his French site BlogNot! called SwapItems. I wonder if you can guess from its name what the script does?
You may have seen a mention of Marc in our post on scripts, as he also wrote a cool script for making indexes based on a list of words. But not everyone needs indexes! Some of us just need to swap objects around, and this script makes it really easy.
For example, you may have one image on the pasteboard and one on the page, but you’re not sure which you want to use. Just swap them back and forth until you like what you see.
There is no user interface; you simply double-click on the script in the Scripts panel (Window > Automation > Scripts) and whatever two objects are currently selected get swapped on the page.
If the two objects are of different size, you can control which handle coordinate is swapped by first selecting it in the Reference Point proxy thing on the left side of the Control panel. For example, if the lower-left corner is selected, then SwapItems will move the two objects, putting the lower-left corner of one where the lower-left corner of the other one was.
Marc is one of the most incredible scripter on the planet. Not only he programs super extra advanced scripts but when he posts them on his website he explains the whole process with compelling informations and screenshots.
Sadly it is only in French but click on a few scripts on his website and you’ll understand why a lot of French speaking users of InDesign can’t do anymore without his scripts.
http://marcautret.free.fr/geek/indd/
Very cool little script.
As for the sight being in French, Babblefish does a reasonable job of translating full web pages by just plugging in the URL.
It’s not perfect but it’s definitely good enough to get the idea.
Merci, Branislav! I had meant to put Marc’s main URL for scripts in the post, but had forgotten.
As Bob says, it’s not hard to get a translation of the pages using Google, though (as Anne-Marie pointed out in the podcast), the results are sometimes as entertaining as they are useful.
Give this a try:
1. Select the two objects
2. Flip horizontal (by clicking the icon in the control panel)
3. Flip vertical
4. Chose Object > Transform Again > Transform Sequence Again Individually
Very clever, Martin! I like it. The script has the added benefit of saying where on the objects it should align. But your would work for many instances.
the whole site translated
Thank you! This script is a huge time & sanity saver.