Sanderling release v16.02.04

This release brings improvements to the memory reading and scripting.

You can load it from https://github.com/Arcitectus/Sanderling/releases/download/v16.02.04/Sanderling.exe

In case you used a previous version, delete the file named “config” before starting the new executable.

changes since v16.00.19:

sending a message to a chat channel

void ChatSendMessage(WindowChatChannel windowChat, string messageText)
{
     if(null == windowChat) return;

     Sanderling.MouseClickLeft(windowChat?.MessageInput);
     Sanderling.TextEntry(messageText);
     Sanderling.KeyboardPress(VirtualKeyCode.RETURN);
}

void ChatCorpSendMessage(string messageText) => ChatSendMessage(
        Sanderling.MemoryMeasurementParsed?.Value?.WindowChatChannel?.FirstOrDefault(c => c?.Caption?.RegexMatchSuccessIgnoreCase("corp") ?? false),
        messageText);

employing the #r directive to make use .NET assembly of your choice

#r "System.Speech" // Assembly name, in this case to be found in GAC

using System.Speech.Synthesis;

var synth = new SpeechSynthesizer();

synth.Speak("BotSharp at your service.");

Depuis la nouvelle version il affiche ce message d’erreur?! j’ai pris le script fournit : Mine.ore.cs

1 Like

Upload and share screenshots and images - print screen online | Snipboard.io

Depuis la nouvelle version il affiche ce message d’erreur?! j’ai pris le script fournit : Mine.ore.cs

Looks like I forgot to adjust the script when moving this method to another namespace.

To solve this, you can add the following using directive at the beginning of the script:

using BotSharp.ToScript.Extension;

Bien j’ai remarqué que depuis cette nouvelle version, Sanderling utilise beaucoup plus de ressources du processeur…

Autour de 40% pour v16.02.04 et 20% pour la v16.00.19 avec les mêmes processus en background. Bien sur j’ai fais plusieurs tests.

Il semble avoir beaucoup de diffilcuté ou n’arrive pas à effectuer certaines tâches, par exemple lancer les drones ou targeter une cible ect…, problemes que je ne rencontrais pas avec la v16.00.19.

Je l’ai tester avec un processeur plus puissant et je rencontrais beaucoup moins de problemes. Alors je pense que cela est donc relié aux performences du processeur.

Bien j’ai remarqué que depuis cette nouvelle version, Sanderling utilise beaucoup plus de ressources du processeur…

Autour de 40% pour v16.02.04 et 20% pour la v16.00.19 avec les mêmes processus en background. Bien sur j’ai fais plusieurs tests.

I tested this. I opened both versions and used this script which is designed to take measurements as fast as possible:

var measurementTime = new Queue<Int64>();var meanSampleCount = 10;  for(var i = 0; ;++i) {     measurementTime.Enqueue(Host.GetTimeContinuousMilli());      if(meanSampleCount < measurementTime.Count)         measurementTime.Dequeue();      var meanDuration = measurementTime.Last() - measurementTime.First();          if(1 < measurementTime.Count)     {         var mean = meanDuration / (measurementTime.Count - 1);         Host.Log("measurement index: " + i + ", average time between the last " + measurementTime.Count + " measurements: " + mean);     }      Sanderling.InvalidateMeasurement();     Sanderling.MemoryMeasurementParsed.Value.ToString(); }

These were the results:

v16.00.19: “average time between the last 10 measurements: 2071”

v16.02.04: “average time between the last 10 measurements: 1077”

What I gather from this is that v16.02.04 can take measurements twice as fast depending on the script. So it uses more CPU cycles because it is faster.

If you want to have a CPU load as low as in v16.00.19 you could adjust to script to wait longer between taking measurements.

Il semble avoir beaucoup de diffilcuté ou n’arrive pas à effectuer certaines tâches, par exemple lancer les drones ou targeter une cible ect…, problemes que je ne rencontrais pas avec la v16.00.19.

Je l’ai tester avec un processeur plus puissant et je rencontrais beaucoup moins de problemes. Alors je pense que cela est donc relié aux performences du processeur.

I don’t know of a API method to launch drones, can you show me that?

There is a timeout when waiting for the measurement. If it takes too long (which of course can also depend on the CPU) then it returns null in order to not block the script. In order to get to the bottom of this, we will have to look at the actual script and maybe the actual timeline of events.

void DroneLaunch() {     Host.Log("launch drones.");     Sanderling.MouseClickRight(DronesInBayListEntry);     Sanderling.MouseClickLeft(Menu?.FirstOrDefault()?.EntryFirstMatchingRegexPattern("launch", RegexOptions.IgnoreCase));     CloseModalUIElement(); }

Je pense que s’est la même que dans le scrip de minage fourni avec le bot.

J’ai utilisé le petit script que tu a donné plus haut et j’ai eu sensiblement les mêmes resultats.

If you want to have a CPU load as low as in v16.00.19 you could adjust to script to wait longer between taking measurements.

Mais comment? Se serait peut-être intéressant de tester

There is a timeout when waiting for the measurement.

Est ce que l’on peut l’augmenter ce timeout? C’est peut-être le probleme. Il serait intétessant de tester ça aussi.

void DroneLaunch() {     Host.Log("launch drones.");     Sanderling.MouseClickRight(DronesInBayListEntry);     Sanderling.MouseClickLeft(Menu?.FirstOrDefault()?.EntryFirstMatchingRegexPattern("launch", RegexOptions.IgnoreCase));     CloseModalUIElement(); }

Ok, that is something we can work with. I have two questions about your situation:

  • How does this code normally work to achieve the desired result? What does it do in the game client UI?
  • What is your approach so far to find out which of the component of the code fails?

Mais comment? Se serait peut-être intéressant de tester

What about the “Host.Delay” method?

Est ce que l’on peut l’augmenter ce timeout? C’est peut-être le probleme. Il serait intétessant de tester ça aussi.

Yes, you can change this value: https://github.com/Arcitectus/Sanderling/blob/3c671fd08ad9564d8d5e9e4fb45d49e178eb15b9/src/Sanderling/Sanderling/Script/IHostToScript.cs#L49.

You should than see the timeout adjusted when testing.

Normalement il click gauche sur “Drones in bay” puis sur “Launch Drones” et voila il execute les autres opérations que je lui demande de faire. Les tooltips se font normalement et active tous les modules.

Avec la nouvelle version il peut «parfois» clicker sur “Drones in bay”  et recommencer plusieurs fois «parfois sans clicker» «parfois» sur “Launch Drones”. Puis il va mesurer les tooltips. Il se rend généralement sur le premier module puis occasionnellement sur le deuxième. Alors il pense qu’il n’y a qu’un seule module et n’active que celui-ci. Il fait d’autres choses d’étrange du même genre.

Normalement il click gauche sur “Drones in bay” puis sur “Launch Drones” et voila il execute les autres opérations que je lui demande de faire. Les tooltips se font normalement et active tous les modules.

Avec la nouvelle version il peut «parfois» clicker sur “Drones in bay”  et recommencer plusieurs fois «parfois sans clicker» «parfois» sur “Launch Drones”. Puis il va mesurer les tooltips. Il se rend généralement sur le premier module puis occasionnellement sur le deuxième. Alors il pense qu’il n’y a qu’un seule module et n’active que celui-ci. Il fait d’autres choses d’étrange du même genre.

As I understand your reply, you are writing not only about the code I asked you about but also other stuff. So I gather from this you prefer not to look at it in detail but keep it more general.

Generally opening the menu takes time as does the appearance of the module tooltip. The code I wrote assumes an upper bound for this delay. If the issues you are seeing are just caused by a longer delay you could work around it by adding additional instructions to invalidate the measurement farther in the future using the “InvalidateMeasurement” method.

For example you could use these functions and replace the calls to mouse click accordingly:

int MeasurementInvalidateByInputDelay = 800;  BotEngine.Motor.MotionResult    MouseClickLeft(IUIElement destination) {     var result = Sanderling.MouseClickLeft(destination);     Sanderling.InvalidateMeasurement(MeasurementInvalidateByInputDelay);     return result; }  BotEngine.Motor.MotionResult    MouseClickRight(IUIElement destination) {     var result = Sanderling.MouseClickRight(destination);     Sanderling.InvalidateMeasurement(MeasurementInvalidateByInputDelay);     return result; }

I assume you can affect at least the tooltip delay using the eve online client settings.

There is also another option to test this. This option does not require you to make any changes to your script.

You can adjust the default assumed upper bound for the forementioned delay at this line:

https://github.com/Arcitectus/Sanderling/blob/8bf12ec8216ad2fccfcc3bce905a0686438a2d05/src/Sanderling/Sanderling.Exe/App.Interface.cs#L67

When testing, you should see an according delay when taking a measurement after clicking.

Normalement il click gauche sur “Drones in bay” puis sur “Launch Drones” et voila il execute les autres opérations que je lui demande de faire. Les tooltips se font normalement et active tous les modules.

Avec la nouvelle version il peut «parfois» clicker sur “Drones in bay”  et recommencer plusieurs fois «parfois sans clicker» «parfois» sur “Launch Drones”. Puis il va mesurer les tooltips. Il se rend généralement sur le premier module puis occasionnellement sur le deuxième. Alors il pense qu’il n’y a qu’un seule module et n’active que celui-ci. Il fait d’autres choses d’étrange du même genre.

As I understand your reply, you are writing not only about the code I asked you about but also other stuff. So I gather from this you prefer not to look at it in detail but keep it more general.

Generally the reaction of the eve online UI to an input takes some time. The code I wrote assumes an upper bound for this delay.

If the issues you are seeing are just caused by a longer delay you could work around it by adding additional instructions to invalidate the measurement farther in the future using the “InvalidateMeasurement” method.

For example you could use these functions and replace the calls to mouse click accordingly:

int MeasurementInvalidateByInputDelay = 800;  BotEngine.Motor.MotionResult    MouseClickLeft(IUIElement destination) {     var result = Sanderling.MouseClickLeft(destination);     Sanderling.InvalidateMeasurement(MeasurementInvalidateByInputDelay);     return result; }  BotEngine.Motor.MotionResult    MouseClickRight(IUIElement destination) {     var result = Sanderling.MouseClickRight(destination);     Sanderling.InvalidateMeasurement(MeasurementInvalidateByInputDelay);     return result; }

I assume you can affect at least the tooltip delay using the eve online client settings.

Could you add pop-up messages in windows tray? Simple info when we start/stop script, script crash info, and user information from running script?

Something like this :

NotifyIcon.ShowBalloonTip Method

Could you add pop-up messages in windows tray? Simple info when we start/stop script, script crash info, and user information from running script?

Something like this :

NotifyIcon.ShowBalloonTip Method

NotifyIcon.ShowBalloonTip Method (System.Windows.Forms) | Microsoft Learn

What about this:

#r "System.Windows.Forms"#r "System.Drawing" using System.Windows.Forms;using System.Drawing; NotifyIcon notifyIcon = new NotifyIcon(); private void showBalloon(string title, string body){     notifyIcon.Visible = true;     notifyIcon.BalloonTipTitle = title;     notifyIcon.BalloonTipText = body;     notifyIcon.Icon = SystemIcons.Application;     notifyIcon.ShowBalloonTip(4444);} showBalloon("Bot#", "user information from running script"); Host.Delay(4444);

I have taken the source from http://stackoverflow.com/questions/13373060/show-a-balloon-notification