Workflow is the name of an algorithm performed by a bot. ElectroNeek Studio Pro allows you to create bots that can independently perform actions on your computer. In this article, we will tell you about the basic principles of building a workflow and show a step-by-step example of creating a simple bot.
Getting Started
Launch Studio Pro. After the program loads, you will see a startup window with two options - "Start development" and "Open workflow". Click "Start Development" to start building the bot. We will be building a bot that opens a notepad and writes text in the input window: "Hello, world!".
Studio Pro Interface
Let's take a look at the elements of the Studio Pro interface.
1 - "Activities" toolbar. Here you can find all the activities that can be performed by the bot.
2 - The canvas. This is where the action blocks are placed in the required order.
3 - The toolbar with the "Properties" and "Variables" tabs. Properties are the parameters of a particular action. Variables are values that can be set or changed in the process of building the workflow and bot operation. In our case, there will be one variable - the text "Hello, world!”.
Working with Activities
Any workflow consists of different activities arranged in a sequence. There are two ways to place an action on the canvas:
- Drag and drop. Press and hold the left mouse button on the selected action, drag it to the canvas and release the left button. An arrow will then appear, connecting the previous action (or START block) to the new action.
- Double-click. Double-click the action you want. Just as in the first case, an arrow connecting the previous action (or "START" block) to the new action will appear on the working surface.
In this way, you can arrange the actions in the order you want.
For each action, there is a set of parameters that allow you to configure the operation of the action correctly. We will consider examples of such parameters in more detail below.
Creating a Bot
Now we can continue building the workflow. Since our bot will open the notepad and write some text in the input field, the first activity we will place on the canvas is "Open application".
Take a look at the parameters of this activity:
To indicate the bot which application to open, select one in the "Application Name/Location" parameter. There are two ways to specify an application in this parameter:
- Enter the name of the application in the "Search for an installed application" line manually. In our case it will be the "Notepad".
- The "Pick app from filesystem" button. Clicking on this button opens File Explorer, where you can find the "Notepad" application at C:\Windows\System32\notepad.exe.
The "Launch parameters" option is used to pass additional command line arguments when launching a program. Command line arguments modify how the program executes or enables specific functions. Keep in mind that each program has its own list of possible parameters. Make sure you know what parameter should be used for the specific application you have selected.
The activity has been created and configured. Let's check how the bot operates: to do this, you can press F5 or the "Run" button on the top toolbar.
The bot worked successfully: Notepad was opened, and two messages appeared in the console, showing that the workflow was executed correctly.
Let's place the next activity on the canvas. This will be the "Input to desktop app" action from the "Keyboard" section.
Take a look at the parameters of this activity:
The first parameter we will go to is the "Interface element" parameter. This parameter is necessary for the bot to understand which part of the interface needs to be interacted with as part of this activity.
Click on the "Pick New Element" button to select the desired part of the interface to interact with.
After you click the "Pick New Element" button, you will go to the desktop with the Notepad opened. Hover your cursor over the input box. A red frame will appear, indicating that the item can be used.
A window will appear at the top right corner of the screen with hints on what you can do.
When you have defined the desired area of the application to interact with, press the "CTRL+X" key combination to confirm the item selection.
After you select and confirm the item, the "Desktop Picker" window will open. At this point, we need to make sure that the item is recognized correctly and click "Save".
Take a look at the next parameter - "Value". In this parameter we will specify the text to be entered in the notepad.
Set the "Set a value" option. In this way, you can enter the desired text manually. We won't use the checkboxes "Use additional syntax for sending keys" and "Submit request/form after typing". Enter the text "Hello, world!" in the "Value" field.
Run the bot and check how it works.
Thus, you have created a simple workflow.