2 Replies Latest reply: Jun 30, 2015 4:11 AM by Prashant Baste RSS

    Fill in page in script

    Francis vd Grijn

      Here below i have a script from an internet file. Below i load page 1 to 2

      After that i wanna load 2- 3

      then i wanna load page 3-4

      till 1000


      Wo can expand this script so it works  with a loop maybe and a variable ?

       

       

       

      LOAD @1 ,

           @2 ,

           @3 ,

           @4 ,

           @5 FROM

      [http://www.internetpage/page.php?ZuidHollandZuid=1&Page=1&AutoRefresh=uit&Page=2]

      (html, codepage is 1252, no labels, table is @3);

       

      concatenate

      LOAD @1 ,

           @2 ,

           @3 ,

           @4 ,

           @5 FROM

      [http://www.internetpage/page.php?ZuidHollandZuid=1&Page=2&AutoRefresh=uit&Page=3]

      (html, codepage is 1252, no labels, table is @3);

       

      till 1000

        • Re: Fill in page in script
          Peter Cammaert

          Hi Francis,

           

          try like this:

           

          FOR i = 1 TO 1000 // or 999 if you will not exceed 1000

            Data:

            LOAD @1 ,

                 @2 ,

                 @3 ,

                 @4 ,

                 @5

            FROM [http://www.internetpage/page.php?ZuidHollandZuid=1&Page=$(i)&AutoRefresh=uit&Page=$(=$(i)+1)]

          (html, codepage is 1252, no labels, table is @3);

          NEXT

           

          Sorry for the line breaks in the FROM specification. Keep the parts together as in your example.

          Note: using a single named table over and over with the same LOAD column list will autoconcatenate all subsequent loads.

           

          Peter

          • Re: Fill in page in script
            Prashant Baste

            Hi Francis vd Grijn

             

            Try below code -

            ==================================

            For var1= 2 to 1000

                 LET var2= ($(var1)-1)

            LOAD @1 ,

                 @2 ,

                 @3 ,

                 @4 ,

                 @5 FROM

            [http://www.internetpage/page.php?ZuidHollandZuid=1&Page=$(var2)&AutoRefresh=uit&Page=$(var1)]

            (html, codepage is 1252, no labels, table is @3);

             

            Next var1;

            ==================================

             

            Let me know if this is helpful to you?

             

            --

            Regards,

            Prashant P Baste