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

Changing a text character to a symbol or solid box help

Tagged: , , ,

Return to Member Forum

  • Author
    Posts
    • #67408

      Hello, I was in the InDesign Forum, and someone there suggested I look at using GREP for my project, not being familiar with scripting that well.

      I have a textbox the I want to make into either a solid, or replace with a bullet based upon the condition that if the textbox has a “1? in it (it would only be either “1? or “0?. In essence I need to turn on or off a box that way. My data is coming from a csv file. I can see the 1 or 0 in the textbox, but have no understanding of scripting to make that on/off thing happen. Do you have any suggestions, or GREP that might work?

      Thanks,

      Ben

    • #67420

      What do you mean by making the textbox “into a solid”? Are you trying to simulate checked and unchecked check boxes? I don’t think you can alter the fill color of the box using grep alone, but you could probably simulate the same visual appearance using two different symbol characters using a grep find and replace. Assuming the targeted textframes each contain only a single character, either 1 or 0:

      \A1\Z would match a solitary 1 in a textframe

      \Z0\Z would match a solitary 0 in a textframe

      Replace the 1 and 0 with appropriate symbol characters. Would that work for your situation?

    • #67422

      The textframes only have one character, yes.

      Here is what I did on paragraph style, created a new paragraph style called it “p1”. I added \A1\Z to the GREP style and selected “basic character formats” to wingdings2. I previewed the document record to record but nothing changed, so I don’t know what else to change or add. Is there something else I need to modify.

      I appreciate your taking time to help me with this, and thank you.

      Ben

      • #67423

        I was not thinking in terms of using a grep style, but I suppose you could, but you still have to change the 1 and 0 characters to something else. You could do 2 find change grep operations through the find change dialog, using the grep panel.

        findWhat: \A1\Z changeTo: \x{F0A2} — unicode for solid black square character in Wingdings2

        findWhat: \A0\Z changeTo: \x{F0A3} — unicode for open square character in Wingdings2

        For changeTo formatting for both, also indicate Wingdings2 font or character style that specifies it, or use grep style. I’m working on a Mac, so I not certain you would be using the same values if you are on a PC.

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