Seo - search engine optimization, ZennoPoster - automatic actions in the browser, Blog, Portfolio, Program, Articles, Service

Examples of using C# – ZennoPoster

Arifmetic Middle Cover

This material will present examples of code in C# + actions on ZennoPoster, will be interesting to those who make scripts, freelancers and many others. Each code is argued or commented to make it convenient for the user to use this information in practice and refer to the post often. The data is constantly supplemented and corrected, keep in mind!

1. The arithmetic mean of the numbers in the list

Scheme = combine the list in the variable “X” separated by “+”, then the next action gets the number of lines in the variable “Y”, the third action performs JS code “(X)/Y”.

      1.1. Clear all lists before you begin.
      1.2 Copy a table column into the list.
      1.3 Delete empty lines in the list.
      1.4 Get the number of lines in the list.
      1.5. Combine the items in the list by the desired delimiter (+).

    Example of use: search for certain product positions in search results, and then find either the current price for each of the submitted sites, or get from several sites the arithmetic average (by taking the desired number of sites and adding up the cost of products in advance).

    Solution

    1.1.

    1.2.

    1.3.

    1.4.

    1.5.

    Script scheme – getting product data from search and sorting information

    The first thing we do is to get the data from the search results (pre-clearing the lists).

    Clear Lists 01

    Getting the right information from the search, we put the links to products in the table.

    Table Data 02

    Search for the specified links to the prices of products, and then enter the data in the same table.

    Prices 03

    Copy the table with prices into the list. Then count the total number of rows and put the specified values with “+” separator into the variable.

    Copy Table 04

    Save the data to a table and put it in the desired folder.

    Excel 05