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

Request a simple script for character styles …

Return to Member Forum

  • Author
    Posts
    • #96382
      gamouning
      Member

      Hi,

      Can someone help me create “a simple script” which defines a new character style? For example, I want to create a “small caps” character style.

      What I currently do is pull down the “New Character Style” menu and under Case select “Open Type All Small Caps”.

      How can this be accomplished with a script?

      Thanks,
      Greg

    • #96383

      What is the benefit of doing these two steps with a script?

      When you wrote such a script, you would normally check, if
      a) a doc is open
      b) a style with a name “small caps” already exists
      c) the font has Open Type small caps

      So there are more steps needed in scripting, than doing it “by hand”.

      Kai

    • #96390
      gamouning
      Member

      Hi Kai,

      Thanks for your reply. Yes, you are correct however, I am not interested in making this script complicated with doing error checking. It will be used with a Find/Change script I created to use an Open Type font.

      Regards,
      Greg

    • #96391

      Greg, try this one:

      app.activeDocument.characterStyles.add({name: “test”, capitalization: Capitalization.CAP_TO_SMALL_CAP});

      and then start it a second time ;-)

    • #96392
      gamouning
      Member

      Thanks Kai, just what I need! :-)

      -Greg

    • #14323671
      gamouning
      Member

      Hi,

      Can someone tell me how to make changes to a predefined paragraph style called “3. text” using javascript? I need to change the applied font name “Times New Roman” fontstyle “Regular” to font name “YaleNew” fontstyle “Roman”.

      Thanks in advance for any assistance you can provide.

      -Greg

    • #14323613
      gamouning
      Member

      This question has been answered and resolved in a different forum. I am posting a link to the thread for any others who might be interested below:

      https://community.adobe.com/t5/indesign/need-to-change-predefined-paragraph-style-items-in-multiple-indesign-files-with-javascript/m-p/10785500

Viewing 6 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads