Site logo

Move to column or resize

Description:

With one object selected, move the object to the nearest column guideline. If it is already on a guideline, do not move it.
Then, (depending on user choice) increase or decrease the width of the object to the nearest column guideline.
The script should reference the column guidelines on the current page.

All the job is done by the main script — Move to column or resize.jsx (don't run it from the Scripts panel) — which is triggered by one of five other small scripts:

  1. Decrease to left.jsx
  2. Decrease to right.jsx
  3. Increase to left.jsx
  4. Increase to right.jsx
  5. Move.jsx

For this purpose, I use the doScript() command which sends the only argument: the script's file name itself.
In this way, I don’t have to write and maintain two or more almost identical scripts. I just can run it from a number of small scripts sending the necessary parameter.

Before

Decrease to left

Decrease to right

Increase to left

Increase to right

Move (to the nearest column guide)

All these scripts should be located in the same folder.

You can Undo/Redo the script

Click here to download the script.

Go back to the main Scripts for L'Express de Toronto Inc. page