1 Reply Latest reply on Nov 29, 2011 9:19 PM by John Hawkinson

    applescript error in tutorial

    JFG5 Level 1

      I'm using the Adobe InDesign CS3 Scripting Tutorial and run into trouble on page 34. I am an absolute beginner with scripting. i'm understanding everything up to this point, I've looked at the dictionary pages and just don't understand the error. My applescript editor is 2.4, which is newer than the one referenced in the tutorial, which could be a problem, I just don't know.

       

      so far ...

      tell application "Adobe InDesign CS3"

        --Create a new document.

                set myDocument to make document

        --Set the measurement units and ruler origin.

                set horizontal measurement units of view preferences to points

                set vertical measurement units of view preferences to points

                set ruler origin of view preferences to page origin

        --Get a reference to the first master spread.

                set myMasterSpread to master spread 1 of myDocument

        --Get a reference to the margin preferences of

        --the first page in the master spread.

                set myMarginPreferences to margin preferences of page 1 of myMasterSpread

        --Now set up the page margins and columns.

                set left of myMarginPreferences to 84

                set top of myMarginPreferences to 70

                set right of myMarginPreferences to 70

                set bottom of myMarginPreferences to 78

                set column count of myMarginPreferences to 3

                set column gutter of myMarginPreferences to 14

        --Page margins and columns for the right-hand page.

                set myMarginPreferences to margin preferences of page 2 of myMasterSpread

                set left of myMarginPreferences to 84

                set top of myMarginPreferences to 70

                set right of myMarginPreferences to 70

                set bottom of myMarginPreferences to 78

                set column count of myMarginPreferences to 3

                set column gutter of myMarginPreferences to 1

                set myGridPreferences to grid preferences

                set baseline division of myGridPreferences to 14

                set baseline start of myGridPreferences to 70

                set baseline grid shown of myGridPreferences to true

       

                set myLeftPage to page 1 of myMasterSpread

                set myRightPage to page 2 of myMasterSpread --- compiles fine to here.

      end tell

      tell myLeftPage

      set myLeftTextFrame to make text frame

      set geometric bounds of myLeftTextFrame to {70, 70, 714, 528}    

      -- right here, I get "Syntax Error  A property can't go after this identifier" trying to compile, withthe "geometric bounds" highlighted,  and I don't understand what that means. It looks like the set myLeftTextFrame variable doesnt refer to the result of but to a process, "make text frame"

       

      set first baseline offset of text frame preferences of myLeftTextFrame to leading offset

      set text column count of text frame preferences of myLeftTextFrame to 3

      set text column gutter of text frame preferences of myLeftTextFrame to 14

      --Add a label to make the frame easier to find later on.

      set label of myLeftTextFrame to "BodyTextFrame"

      end tell

      tell myRightPage

      set myRightTextFrame to make text frame

      set geometric bounds of myRightTextFrame to {70, 84, 714, 542}

      set first baseline offset of text frame preferences of myRightTextFrame to leading offset

      set text column count of text frame preferences of myRightTextFrame to 3

      set text column gutter of text frame preferences of myRightTextFrame to 14

      --Add a label to make the frame easier to find later on.

      set label of myRightTextFrame to "BodyTextFrame"

      end tell

       

      any help would be appreciated. If I need to be looking at something simpler, let me know.