11 Replies Latest reply on Sep 19, 2012 8:59 AM by try67

    Error: missing } in xml expression. I cant solve this!

    Bigboigordo

      <script type="text/javascript">

      var myObject = new ActiveXObject("Scripting.FileSystemObject");

      var pasta = "C:\Users\Catatau\Desktop\BROTHER\Medcurso\oukey\";

      var folder = myObject.GetFolder(pasta);

      var jpg = ".jpg"

      var pdf = ".pdf"

      var barra = "\";

      </script>

      for(var pastas in folder)

      {

              <script type="text/javascript">

                var newDoc = app.newDoc();

              var pt1 = pastas.name;

              var pasta2 = pasta + pt1 + barra;

                var folder2 = myObject.GetFolder(pasta2);

                var x = 1;

                for(var files in folder2){x = x+1}

                var k = 0;

              </script>

              while(x>k) {

                      <script type="text/javascript">

                      k = k+1;

                          var arquivo = pasta2 + k + jpg;

                          newDoc.insertPages({nPage: k, cPath: arquivo,});

                }

                var destino = pasta + pt1 + pdf;

                newDoc.saveAs({cPath: destino,});

                newDoc.closeDoc(true);

      }

      </script>

       

      That`s the script.

           Error1: SyntaxError: missing } in xml expression                                                     Ln 25. Col 3.

                      24: line 25.

                     First text in red is selected / first text in green (where i think the error refers to).

           Error2: SyntaxError: missing } in xml expression                                                     Ln 28. Col 24.

                      27: line 28.

                     Second text in red is selected / Second text in green (where i think the error refers to).