Creation of the Dynamic Part of the Application
Now you know how to define specific data variables (in the application editor
) and how to visualize these variables by connecting them with corresponding graphic items by data bindings (in the panel editor
). In the following chapter you will learn how to use scripts in order to add dynamic into your application - vitalize it.
In reality it is often needed that the application does some specific action repeatedly every second, or that some defined action is triggered by pressing a key or clicking on a graphic button. Therefore we need to define an algorithm (script) that actually does something when something happens.
In some very simple cases it is possible to define the algorithm by clicking some configuration buttons
. For example, some communication with outer sensors can be estabilished in order to refresh the data.
The PROMOTIC system allows you to write algorithms in the VBScript
programming language. This language is a subset of the Visual Basic language (VBScript
= Visual Basic Script). Everything that you will learn in the following chapters, can also be used for example in the Microsoft Excel
programs because the same Visual Basic language is used here for defining macros.
The main advantage of the VBScript
language is the possibility of using the objects – VBScript is the object oriented language
. And because the PROMOTIC system is an object oriented system, the VBScript
language is much natural for it.