Plugins

Table of contents


Description

Plugins are user-created actions.
In fact, these are templates with a bot interface (BotUI), saved in a special way. Plugins have the .zpg extension and can return the result of their work.

Each field in which you can enter data supports variable macros.


Plugins are very similar to a project in project, but they are much more convenient:

  • you can create a convenient interface for passing values to it (when working through a project in a project, you need to match variables from the main template and the called one, because of this you often have to switch to a sub-template in order to remember what this or that variable is used for)

  • installed once and then available in all projects as standard actions (a project in a project requires each time to specify the full path to the called template and if you accidentally or intentionally change the location of the sub-template on the computer or rename it, then all projects that caused this template will break)

  • you can sell a template with an unlimited number of plugins for only $ 12 (while when using nested projects, the cost of the template increased depending on the number of sub-templates)

Where can it be applied?

Any repetitive actions can be packaged into a plugin:

  • for example you need to search for videos on YouTube and save links to them. For these purposes, you have already written a group of actions (or even a separate template) that do their job perfectly. In order to add this functionality to another template, you have to either connect the project in project, or copy actions and paste in the right place. At first glance, the copy-paste method may seem very simple and convenient, but imagine that in your template there are 6 places in which you need to search for videos, you copy the necessary actions six times. Everything works, everything is fine. And then you wanted to make edits to the video search functionality on YouTube, now you have to search for all the places where you previously inserted these actions and make edits (and if the template is not one, but 10-20-33 ...). On the other hand, you can pack all this into a plugin and call it. And, if you need to make changes to its work, then you only need to change the plugin and reinstall it.

  • sending notifications to Telegram/VK/something else. While you are sending only text, you can use one cube of a GET or POST request. But then you will want to send formatted text, add pictures, audio files and other attachments to it. Over time, one action will grow into a large group of cubes, and in this case, you should also think about packing all of them into a plugin.

  • take a random string from the specified text file. To do this, you need to create a separate list, bind the list to a file (it is advisable to check that such a file exists at all), get a random string from the list - at least three actions. You might want to make all the letters in upper or, conversely, lower case, or cut the string to 80 characters. All this can be packaged into a plugin.

  • Any template can be made a plugin. When using plugins, you are limited only by your imagination.


Installing plugins in ProjectMaker

There are several ways to install ready-made plugins:

  1. The easiest one is to double click on the plugin file. If a plug-in with the same file name has already been installed, a dialog box will appear prompting you to replace the installed one. If this is the first installation of this plugin, then a window will appear informing about the successful installation.

  2. Adding via settings. The advantage of this method is that you can select several files at once and install them all at once. If there is an attempt to add a plugin whose file name coincides with the already installed one, a window will appear listing the plugins that could not be installed. Once added, plugins are immediately ready to go.

  3. Copying plugins to a local directory on your computer (by default it is C:\Users\[username]\Documents\ ZennoLab\Plugins\Local), after that you need to restart ProjectMaker.

Removing plugins

  1. Through settings:

  2. The second way is to delete files from the local directory on the computer (in this case, it is better to restart ProjectMaker).


How to add plugins to a project?

There are several ways:

  • Context Menu Add Action -> Local Plugins

  • At the very bottom of the Actions window

  • Or use smart search.


How to work with plugins?

Working with custom plugins is practically no different from working with standard actions - add the plugin to the project in a way convenient for you, fill in the incoming settings (you can use project variables in these settings)


Saving a template as a plugin?

Saving methods

There are several ways to save a template as a plugin:

  • in the top menu, select File-Publish Project (or a combination of hot keys for the same action Ctrl + Alt + P). A window for publishing the project will appear, in the What to do drop-down list, select Save as plugin.

  • in the same top menu, select File-Save Project as Plugin

  • right-click on the tab of the desired project in the project window and select Save project as plugin from the context menu

Save settings

Main window and tab “Plugin settings”

If you hover the mouse cursor over an input field or a field name, a tooltip for this field will appear.

Where to save

Select the location on your computer where the plugin file will be saved.

When installing a plugin into the program, this file will be copied to the Directory of installed plugins.

Encrypt project

This option allows you to encrypt the entire project file. If embedding external libraries is enabled, they will also be encrypted.

When selling plugins, they should not be encrypted. they cannot be re-encrypted. That is, you will not be able to resell a plugin that you bought yourself.

Name

Set the plugin name (with this name it will be displayed in ProjectMaker).

Version

Install the required version of the plugin.

Icon

Load the icon for your plugin.

Supported formats - png, ico, bmp; sizes - from 16x16 to 128x128. If the plugin has its own icon, it will be visually easier to find it among other actions.

Log plugin errors

If this checkbox is checked and the template has completed with an unhandled error, then the text of this error will be logged (for example - “HTML element not found by search terms”). Otherwise, there will be only the message “Error processing plugin“

More tab

This tab is worth filling out if you are going to sell your plugin, or just share it with other people. On it we enter our email for feedback, add a description and add. contacts, as well as the link of the plugin theme on the forum http://zennolab.com (if you want to add the plugin itself to the theme, you can first create and design a theme, publish it, then add a link to this topic in the plugin and then edit the message in theme by adding the plugin file itself).

Preview and Publish

Before saving the plugin, you can click the Preview button to see how its description will look.

After clicking on the "Perform publishing" button, the project will be checked and assembled into a plugin. If there were no errors during the build process, then two new buttons will appear:

  • Open plugin folder

  • Add to ProjectMaker


Selling projects with plugins

Read more in the article Selling bots with plugins


Plugin inbound settings

Incoming settings for plugins are generated using BotUI. But when creating settings for plugins, there are several additional options - this is the Mapper and the return value.

Mapper

This control allows you to transfer lists, tables or Google Sheets from the main template to the plugin.

To add a Mapper in the Bot Interface Editor, scroll the slider on the Toolbar to the very bottom and drag the control from it to the main window. Click on the newly added control and configure it (the settings are on the right):

  1. DataType - the type of the transmitted object. Possible values:

2. BindingElement - an internal object (list or table) into which data from the external template will fall (this object must exist at the time the settings are created).

Now we can easily pass the list to the plugin:

Return value

A plugin can return the result of its work. In order to enable this feature, in the Bot interface editor, in the main window, where all controls are added, click in any empty space and check the Return value (Plugin Mode) checkbox on the right:

There are several types of return values:

  1. Variables

  2. List

  3. Table

  4. Variables (in addition, you can specify a description for each variable, so that the person who will use the plugin will find it easier to navigate)

Settings view when CREATING a plugin (returning multiple variables)

Settings view when CALLING the plugin (returning several variables)

If you choose any type of return value, you will need to associate with it an internal object in which this return value will be stored.


Sample custom plugins from ZennoLab forum

Open source:

Closed source: