6 Replies Latest reply on Jan 23, 2015 2:56 AM by Vel Prakash

    CS 6 alignment problem

    hamdifem Level 1

      I am using İndesign CS 6

      With this command a text frame does not stop at the exact location

      but When I give a space position comes to

      how this problem can be solved

       

      var box1 = app.selection[0].texts[0].insertionPoints.item(-1).textFrames.add();
      box1.geometricBounds = [0, 0, 8, 5];
      box1.anchoredObjectSettings.anchorYoffset = 0.15;
      var txt = box1.texts[0].insertionPoints.item(-1).contents = "A";
      box1.texts[0].pointSize = 21;
      box1.fit(FitOptions.FRAME_TO_CONTENT);
      

       

      u1.jpg

        • 1. Re: CS 6 alignment problem
          Peter Spier Most Valuable Participant (Moderator)

          I've moved your post to the scripting forum...

          • 2. Re: CS 6 alignment problem
            hamdifem Level 1

            problem is not related to the script

            linked object is changed

            If you do FRAME_TO_CONTENT

            Aligned does not stop

            but if you give a space before the connection object

            sitting on the line

            • 3. Re: CS 6 alignment problem
              Peter Spier Most Valuable Participant (Moderator)

              I'm pretty sure this is still the right forum since you are using a script to place the frame. I don't understand the question, and most users in the general forum won't understand it either, but I bet there are people here who do.

              • 4. Re: CS 6 alignment problem
                Laubender Adobe Community Professional & MVP

                @hamdifem – I hope I do understand what you are asking. I'm not sure at all, because I cannot see that the code you are giving will add a text frame at the position that your screenshot is suggesting. Your code attempts to add a text frame at the last insertion point of the text frame (your selection), not to the second one (assumption when looking at your screenshot).

                 

                Some other things: What is the meassurement system in your example for horizontal and vertical direction?

                What is the point size for your regular text in your example? Is the text frame where you added the new text frame in itself anchored?*

                 

                Can you do two screenshots of:

                 

                A. Situation before

                B. Situation after: That means the result you want to achieve by writing a script (but just do it by means of the "normal" user interface of InDesign) together with some measurement values plus the used measurement systems for all objects and texts that are depicted

                 

                Note: Your code does not control the text frame options, your code does not control all anchored objects settings, just the y-position. Your code is telling nothing about the settings of your basic object style settings. So other app preferences may/will fill in this gap.

                 

                *Best publish an IDML file via Dropbox or a similar service and somebody could have a look at the real situation in your document showing the situation A and B.

                 

                For a start, explain in plain English what you want to achieve like:

                1. I want to insert a text frame at the first/second/last (?) insertion point of the text frame.

                2. Its anchor should be inline/above line/anchored (??)

                3. Its offset from the baseline should be 0.15 point/inch/mm/??

                4. Its contents should be "A"

                 

                And: What is the real purpose of all this?

                 

                Uwe

                • 5. Re: CS 6 alignment problem
                  hamdifem Level 1

                  problem is not related to the script

                  İndesign CS5.5 and CC that does not happen

                  problems in CS6

                  Başlıksız-1.jpg

                  • 6. Re: CS 6 alignment problem
                    Vel Prakash Level 1

                    Hi Hamdifem,

                     

                    First of all, you are not getting the solution what Laubendar explained. See, You may have Indesign CS5.5, CS 6, CC. But Please keep in mind, All the versions doesn't setted with the same Settings like metrics in your PC / Laptop. So while assigning values for anchor object you should be very clear. And Control whichever properties you needed. Only Y Offset wont fulfil all.

                     

                    I suggest you to go through Laubendar's comments.

                     

                    Regards,

                    Vel.