6 Replies Latest reply on Sep 19, 2016 10:32 AM by cbishop01

    Another Hopefully easy Dialog Box question.

    cbishop01 Level 2

      Hi again. This is more for my preferences.  Is there a way to bold a second section of Words in the Dialog box (Contains Corrections:)?  I want it to bold both the (Corrections Made, And Contains Corrections. etc...) that way its easier to see were the separations are.

       

      alerts = [numberOfChanges+" Double Space", SP+" Space Period", SC+" Space Colon"];
      alerts1 = [CCH+" Pink ? to A Contains", CE+" Pink ? to E Contains ", CK+" Pink ? to K Contains"];
       alert("Corrections Made:\r"+alerts.join("\r")+"\rContains Corrections:\r"+alerts1.join("\r") );
      

      Screen Shot 2016-09-19 at 11.31.25 AM.png

        • 2. Re: Another Hopefully easy Dialog Box question.
          Trevorׅ Adobe Community Professional

          Best bet is adding something like +'-----------------------------------\n' + as a separator

          1 person found this helpful
          • 3. Re: Another Hopefully easy Dialog Box question.
            Trevorׅ Adobe Community Professional

            How about?

             

            var myBla =[], mySmilies;
            mySmilies = new Array(15).join('\ud83d\ude03');
            myBla.push ('Blah Blah Blah Blah');
            myBla.push(mySmilies);
            myBla.push ('Blah Blah Blah Blah');
            myBla.push(mySmilies);
            
            alert(myBla.join('\n'));
            

             

            Screen Shot 2016-09-19 at 19.48.51.png

             

            P.s. probably only works on Macs, didn't test on windows

            1 person found this helpful
            • 4. Re: Another Hopefully easy Dialog Box question.
              Skemicle Level 3

              Bold cannot be applied to alerts.. If you want seperation between the two sections Trevor's solution would be the easiest and in most cases most convenient.. However, you could create your own "alert" box with the desired information:

              var DS = 1248;
              var SP = 158;
              var SC = 3;
              var CCH = 15;
              var CE = 15;
              var CK = 15;
              with(new Window('dialog', 'Custom Alert')){
                  alignChildren = "left";
                  with(add('panel', undefined, "Changes Made:")){
                      add('statictext',undefined, DS + ": Double Spaces");
                      add('statictext',undefined, SP + ": Space Periods");
                      add('statictext',undefined, SC + ": Space Colons");
                  }with(add('panel', undefined, "Contains Corrections:")){
                      add('statictext',undefined, CCH + ": Pink ? to A Contains");
                      add('statictext',undefined, CE + ": Pink ? to E Contains");
                      add('statictext',undefined, CK + ": Pink ? to K Contains");
                  }var okbtn = add('button',undefined, "OK")
                  okbtn.alignment = "right";
              show()}
              

              Of course that gets into a whole new area of scripting and opens up room for so much more error.

              1 person found this helpful
              • 5. Re: Another Hopefully easy Dialog Box question.
                Skemicle Level 3

                I get rectangles instead of smilies on my system. Running windows. but everything else displays properly.

                • 6. Re: Another Hopefully easy Dialog Box question.
                  cbishop01 Level 2

                  The downside i'm seeing on this would be that the Amount of DS, SP etc.. changing from label to label would change.  If my understanding on this is correct They would stay the same all the time with this code.  Correct me if my thinking is wrong.

                  thank you guys.  I'll probably stick with the ----------- because if we use this on a windows machine i would like it too look the same.