Botlab direct DLL invokation


I’m returning after some time and am trying to determine how to integrate BotLab in the same way I used to integrate BotEngine.

I have a wider framework I have developed and invoked BotEngine directly from the .dll. I know this is not a common way to use the software.

To simplify, the way I previously launched scripts was the equivalent of:

dotnet C:\path\to\BotEngine.dll run path_to_script --detailed-session-recording=off

I was invoking directly with C#, but the above was a simple way to launch. Is it possible to do the same with BotLab? I would rather not invoke the larger .exe as it takes quite some time to unpack/launch. I prefer to directly run from my own framework after manually unpacking.

1 Like

Welcome back!

You are right. That approach to start is not a common way.
So this is about the time to startup?
I tested the startup of the newest client version to get an idea of how long it takes.
On my machine, it was less than two seconds. It is possible to expand the BotLab client program to have a CLI-only version without the graphical user interface. This would save some portion of those two seconds. Maybe one second, maybe less, I don’t know.
At the moment, there is no such optimized version.

After moving to .NET 7.0 I am able to interact with the DLL again. Now that I have solved this I am able to interact with the DLL as I did before.

I am trying to figure out the following two things now:

  1. How to avoid needing to press “Start Play Session”, is there a parameter to pass to skip this?
  2. Is there a way to provide the UI Root offset in the script so that we don’t need to wait for it to be searched?
1 Like

Nice, good to know you found a way.

The BotLab client currently does not support that. But now that I know about your application, I will add it.
I guess it will be a new CLI option. Not sure about the name.
The new BotLab client will be ready next week.

What is that UI Root offset? Is this a concept represented in the user interface somehow? Do you have a screenshot of it?

Yes, since version 2022-10-07 of the BotLab client, there is the --skip-review-config option to skip this.
To quote the changelog:

Add an option on the command-line interface to continue into the play session stage without interaction. Without this option, the user needs to click the ‘Start Play Session’ button in the view to review the bot description and (in the future also) the session configuration.