1 Reply Latest reply on Nov 11, 2010 2:38 PM by Marc Autret

    Please help to convert the piece of code to javascript

    karthikb1987 Level 1

      Hi,

      As i am not good in apple script

      Could any oneof you please help me to convert the below apple script to javascript

       

      The input to this function is "selection"

       

      on doInd_MoveObjectToZeroPoint(theObject)
      -- Pass object reference or "selection"
      tell application "Adobe InDesign CS4"
        tell document 1
         if theObject is "selection" then set theObject to object reference of selection
         set theObjectBounds to visible bounds of theObject
         move theObject by {-(item 2 of theObjectBounds as number), -(item 1 of theObjectBounds as number)}
        end tell
      end tell
      end doInd_MoveObjectToZeroPoint