Automate everything

User Tools

Site Tools


Translations of this page:


Processing variables

Why use variables

Variables can be used to:

  • Provide access to your data within the project
  • Helps to organize cycles
  • Provide a link between the threads executing a project
  • Provide a link between the different projects running
  • Provide access to the current web page or a computer. For example, URL of the current page, the text of the current web page, the current time, etc.

Types of variables

  • Local variables are visible only inside of your project, and only in the executing thread. At the beginning of the project, these variables get their value from the initial list of variables. At the end of the project these variables will be destroyed and their values ​will no longer be available.
  • Own local variables - variables that you created during the editing project.
  • Automatically generated local variables - are variables, which were created in the project automatically.
  • Global variables, except the names, have their own namespaces. This is done to prevent conflict between the global variables from different projects. For example, you bought, or simply download someone else's project. Even if the names of global variables in your own projects and others will be the same, they still will not interfere with each other, because they will have different namespaces. Despite the fact that it is the global variables, they are created in your project, but not in the ZennoPoster. This means that a global variable is created when your project is the first time assigns it a value. But the global variable is destroyed after rebooting ZennoPoster.
  • Environment variables - variables that provide access to some data of the current web page, computer, etc.

Create, rename, and display variables

All local variables are usually created in the actions themselves, from which you want to get the result.

It is strongly recommended to give the variables meaningful names. Otherwise, you will quickly begin to flounder in a more or less complex projects. In a few weeks you will not understand them.

Also, local variables can be created in the project editor in the static block settings area. There is a list of all your project variables, it is editable. When you create a variable in the list of all the variables you can assign an initial value.
Note: The variables in the list of variables can be renamed. If you rename their name will be changeв automatically whenever they are used in the project.
All other variables (and also local) are available in the project editor via button “All variables”.

How to access the variable

All variables are available through a macro by name, such as {-Variable.my_var-} (this a macro to access variable my_var ). For global variable you have to specify the namespace of the variable. A macro variable can be inserted into any field in the Project Editor. When you perform an action, the macro will be replaced by the value of the variable.

Variables use

Variables initialization

Remove a variable from the project

Variable counter

Get variables value

en/variables.txt · Last modified: 2015/11/10 13:29 by vladz