Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Random baseline Offset for every Character

Return to Member Forum

  • Author
    Posts
    • #63496
      8bit31
      Participant

      Hi There,

      my name is Matthias and i have to do a crawl for a film. I always layout crawls in Indesign, but now a client wishes that i do a slightly baseline Offset for every Character. In AfterEffects there is a kind of effect, where i could do this, but setting a crawl in AfterEffects is real horror… So i think there is a simple solution to do this with a Script in Indesign but my Programming skills are really bad.

      the script should

      -go to the first Character

      – set the baseline Offset to a value from-1 to +1

      -then go to the next Character till the end of the Document

      It would be very nice, if someone could help me with this Script, because i cant find anything on all of the IndesignScripting pages that matches my problem.

      Best!

      Matthias

    • #63497
      8bit31
      Participant

      After some hours google i found this little miniscript…

      for (i=0; i<app.selection[0].length; i++)
      {
      app.selection[0].characters[i].baselineShift = Math.round(1*Math.random())/2;
      //app.selection[0].characters[i].pointSize += Math.round(4*Math.random())-2;
      //app.selection[0].characters[i].horizontalScale = 100+Math.round(20*Math.random())-10;
      //app.selection[0].characters[i].verticalScale = 100+Math.round(20*Math.random())-10;
      }

      Maybe someone can use this…

    • #63498

      The first line inside the loop sets a random baseline shift. Following the formula, it seems this sets either 0 or 1, nothing else. In your case, you want −1 to +1 and all values in between. So try this line instead:

      app.selection[0].characters[i].baselineShift = 2*Math.random()-1;

      The real question everyone will want an answer to … What is a “crawl”? :)

    • #63499
      8bit31
      Participant

      Thanks a lot for your input so i will use this line of code.

      Here is the answer everybody is waiting for ;-)

      its a rolling end credit – normally no one will see this because theyre out of the cinema at its beginning…

      thats the bad thing of my job :-(

    • #74067

      Hi there — this little script is great! Many thanks for posting…

      Any chance you could point out how I could do a similar thing but with tracking?

      thanks

      matt

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
Forum Ads