Dealing with Auto-Size and Anchor objects (Text Frames)

Hi Everyone,

Can anyone please help me to automate the task given below using AppleScript.

Here is the scenario:

  1. InDesign CC 2014
  2. One Text-Frame(a) containing two Anchor Text-Frames (c,b)

Requirements:

  1. Set the auto-size of selected Text-Frame(a) to Height and Width, Minimum Height: 12p0, Minimum Width: 18p0, No Line Breaks
  2. Set the Horizontal and Vertical Justification of Text-Frame(a) to “Centre”
  3. Set the Anchored Options of both objects (b & c) from Custom to “Inline or Above Line”
  4. Set the Vertical Justification of Anchored Text-Frame(c,b) to “Centre”
  5. Swap the Anchored Text-Frames (c,b) to (b,c) within Text-Frame(a) using the Story Editor

Thanks in advance.
Masood