When you create a bot in Studio Pro, you start with a project. In a logical sense, the project contains all the files that can be compiled into an executable bot. Those files can include workflow, images, data files, and so on. By default, your project also has a configuration file that contains platform settings (browser settings, etc.) and user defined settings (variables, etc.).
In order to create a new project (bot) you need to click on the "Create project" button as shown below:
After you have clicked on the button, a window will appear with the following parameters:
Name: the name of your project, you can choose any name.
Location: the location of the new project on your computer.
Main file name: the name of your main file in the .neek format.
In order to open the existed project, you need to click on the "Open project" button as shown below:
After you have clicked on the button, you should specify your project folder on your computer and click the "Select folder" button as follows:
After all these steps, the workflow for your bot appears.
Note that double-clicking on the main.neek file (the name of this file is set when the project is created) will not open the project, but the workflow contained in this file.
There is a special mode in Studio Pro, which you can see on the start screen:
This mode can help you when you would like to quickly check the functionality of all activites or even implement a bot. Also, you can save your bot to a single .neek file. However, you cannot use the configuration file, convert to your bot to the .neex format, and upload it to Orchestrator SaaS.
In the project settings it is possible to initialize variables. To do this, go to "Settings" → "Project" → "Variables" and click on the "Add variable" button. Such variables can only be represented as strings, they can't be of, for example, boolean type (true or false).
The variables initialized in this way will not need to be initialized by a separate activity in the algorithm - to work with the variable within the algorithm, you only need to specify its name. Such variables will always be global, that is, they can be used in any part of the project. Variables will be preserved when the project is transferred to another machine.
Please note one feature: if you initialize a variable, already initialized in the project settings with the "Set a variable value" activity, in the algorithm itself the value of the variable will take the value specified in the activity, and the variable itself will be duplicated, that is, there will be two variables with the same name and different values in the project. However, if the variable initialized in the activity is made global, the value of the variable initialized in the project settings will change to the new one.
Configuring Project Structure
Project structure tree
In Studio Pro, your project is organized in a hierarchy of subfolders — project tree. The highest folder of your project is the project folder itself. By default, the tree structure is subdivided into eight parts:
elements— this subfolder contains activities that interact with desktop elements.
execute_js_code_scripts— this subfolder contains the JS scripts used by your bot.
screenshots— this subfolder contains activities that interact with images (Click on image, Find image, etc.).
logs— this subfolder contains logs. You can learn more about logs in this article.
termelements— this subfolder contains activities that interact with terminal elements.
webelements— this subfolder contains activities that interact with web-elements.
main.neek— this executable file is the entry point of the bot, you can choose it yourself.
project.json— this is a project configuration file.
You can import elements (elements, termelements and webelements) from other libraries or projects to the current one. To do that, navigate to the top toolbar "Tools" → "Import elements".
The following figure illustrates how the project tree and workflow may look like:
It is important to note that you can add folders, .neek files and rename .neek files (all corresponding links to this file are automatically updated) using the context menu if you right click in the PROJECT area as shown below:
Furthermore, any files are available in the project if they have been moved to the project folder. For this reason, you can move files/folders within the project using drag-and-drop as follows:
Note that renaming .neek files in Windows File Explorer is not allowed. Doing so can cause the project to malfunction in Studio Pro.
Note. There is an Import workflow function ("Tools" → "Import workflow") that allows you to move an algorithm already created from another project to the current one, saving all the contents of the moved file.
You can select the browser for the workflow to interact. To do this, go to "Settings" → "Project" → "Web Browser". In this menu, you can choose one of the ways to work with the browsers supported by the ElectroNeek platform.
Project configuration file (config)
A project configuration file in Studio Pro is a file used to configure the parameters and settings for your bot. This file can be edited through Studio Pro / Bot Runner looks and its structure is shown below:
Save as project
When you are ready to save the project, navigate to the menu "File" → "Save as project".
In the opened window, enter the name of the project and pick a directory, where it will be saved. You can also change the name of the main.neek file.
Pay attention that:
- If a workflow contains a link to a subprogram and this subprogram is stored in another directory - after saving such workflow as a project, the path to subprogram will be relative.
- If a workflow contains a link to a subprogram and this subprogram is stored in the same directory - after saving such workflow as a project, the subprogram will be placed inside the project.