XHE Local Manager is a separate free software that will help you work in multithreaded mode with the Human Emulator Studio.
Current version: 1.4.0
You can download the Manager on our forum, where you can also leave your suggestions and questions about the program.
The Manager is used to run scripts in multithreaded mode. For this purpose, so-called tasks are used. In fact, the task is a script that will run its own exe human emulator in the amount specified in the task.
To run tasks, use software that are copied from the root folder of the program, which is defined in the settings as XHE Main Folder. When starting a task, the Manager, if the task is started for the first time, creates a folder with the task number and copies the Human Emulator there. The following runs use exe from the tasks folder. The software has the functionality to update all used Human Emulator.
The threads are updated from the XHE Main Folder, so if you want to update all the exe files in the tasks, you first update the XHE Main folder, and then on the Tasks tab, click the Update XHE button to update the selected task, or Update All XHE to update all the tasks.
Updates can be performed from disk or from ftp, http, sftp.
If the update is performed from disk, then a folder or zip archive is used as the update source. From other places — zip archive. Updates to human tasks are performed only from the root folder XHE Main Folder.
Login and password in the program settings is the username and password required to access the update source, i.e. access to ftp or http, where the zip archive is located for updating the XHE Main Folder. This archive must contain a version of the program that has already been activated for this computer, that is, the files code.txt and email.txt must be in its settings folder. Otherwise, when you run the task, you will be prompted to activate the program.
When the task is started, threads are started. These threads can be hidden, opened for viewing, and stopped, all at once, or only selected threads or tasks. To work in multithreaded mode, you need to adapt scripts to this task. The following variables are used for this purpose:
// multithreaded mode - thread number
// multithreaded mode - thread port
Through these variables, the script will receive the number of the thread that runs the script. That is, the numbers 0,1,2,3, etc., depending on the number of running threads. This is used to parallelize the execution of a task between running threads.
IMPORTANT: After installation, the program must run as an administrator.
Preparation of scripts
As noted in the section description of the program for working with the Manager, scripts must be adapted to work with this tool.
For a script to run in multiple threads, the beginning of the script must be as follows:
// multithreaded mode - thread number
// multithreaded mode - thread port
// host for multithread
// The following code is required to properly run XWeb Human Emulator
The first $xhe_host =”127.0.0.1:7110″; we specify that Human Emulator Studio does not change the second line $xhe_host =”127.0.0.1:$xhe_thread_port”; if this is set in the settings.
The $xhe_thread_num variable can be used to determine the current thread, for example, to write the results of work to a file.
In the folder Local Manager\My Scripts there are examples of scripts that we will use to create tasks. These same scripts can be viewed as an example for adapting your scripts to the Manager.
Open the settings dialog using the menu or pressing the F9 key. See:
Where Source of XHE Update is the path to the program folder from which we will update the so-called XHE Main folder. The program from this folder will take the exe files and copy them to the threads to perform your tasks.
It is important that the Source path is real. Set it and click on the Update Main XHE Folder button. We are waiting for the program to copy the necessary files. At this time, the program window will not be available, but the panel with logs will display information that the copying started, and then that it ended.
The second tab of the settings dialog contains:
Refresh threads period (seconds) this is the refresh rate of the table of running threads in the Running Threads tab.
Auto restart threads by suspend – automatically restart fallen threads. If this check box is set in the program settings, the Manager will automatically restart threads that have fallen off during operation.
Working with tasks
Tasks are the main element of working with the Manager. For each of your scripts, you create your own task, where you specify the appropriate settings.
Creating a task
To add a new task, click the Add button. A dialog opens with several tabs.
The General tab is the name and description of the task.
The Threads tab is the number of threads and the path to the script, as well as the script arguments. By default, arguments contain the necessary arguments for operation. You can add your own through the space bar.
The Options tab is used to configure the operation of each exe thread being started. Here you may specify the folder with the cookies and settings for thread, browser command, and using the checkboxes to set: to curtail the run thread to tray — /in_tray, whether to hide the tray icon — /hide_tray_icon, to start a thread to work in unicode — /as_unicode, asking about change of port /ask_port, if a check is not worth it, the thread is automatic to move on to the next port when the configured port is busy. If this check box is selected, the thread will ask at startup before moving to the next port. And another check mark, use RT version, indicates whether to use the RT version or the full version of the program.
After we have set all the necessary settings for the task. Click the OK button. Our task will appear in the task table on the Tasks tab.
Now we can start it. To do this, click the Run button.
First, the program will create a tasks folder and a folder with the task number in it, to which it will copy the program to run threads from the XHE Main folder. After copying, the threads themselves are started. This opens the Running Threads tab with a table of running threads. The table displays data on these threads, the status of the scripts, and the amount of memory consumed by the threads.
On the same tab, you can update the table, you can do it automatically or by pressing a button, as well as leave the selected thread, show or hide the thread. When you click the Show button, the thread window will be expanded on top of other windows. When you click the Hide button, the selected thread will be hidden again. Accordingly, the Show All and Hide All buttons perform the same actions only for all threads at once.
In order to stop and close all threads at once on the Tasks tab, click the Stop button. You can also stop all tasks from running on this tab, as well as update programs that use tasks.
Running a scheduled task
The Manager also has functionality for running tasks on a schedule. It is very similar to the schedule for running scripts in the Human Emulator Studio.
To configure running tasks on a schedule, go to the Scheduler tab. And click on the Add button.
The task launch settings dialog opens.
Using this dialog, you specify the type of launch — it can be a single launch, a launch after a specified period of time, or an infinite (non-stop) launch. Here we specify the Start time, that is, the time of the first launch. Select the task that you want to run on a schedule. Write a comment on this task, and use the Active checkbox to set whether the launch will be active after creation. After all the settings have been set, click on the OK button.
Running on a schedule will appear in the table in the Scheduler tab.
On the same tab, in addition to adding a scheduled task launch. There are a number of buttons that allow you to edit, Activate or deactivate, delete the selected launch in the table, as well as buttons that allow you to do the same actions for all launches in the table.
You can use the Import All and Export All buttons to save launches to a json file or load them from it.