Manually telling Sanderling what modules you have

Ok changing to while was a bad move the if version was working but I needed to change the measure tooltips function too.I found the extra measure tooltips function in the The Mining Script of Without seems to do what I need Thanks Without. I am still testing as typically the bug is not happening now.
Anyway here’s all the code .

[code]// Keep measuring tooltips until moduleMiner = MiningLasers
var MiningLasers = 2;

if (!(MiningLasers == SetModuleMiner?.Length))
{
ModuleMeasureAllTooltip();
}

void ModuleMeasureAllTooltip()
{
Host.Log(“measure tooltips of all modules.”);

for (int i = 0; i < Sanderling.MemoryMeasurementAccu?.Value?.ShipUiModule?.Count(); ++i)
{
    var NextModule = Sanderling.MemoryMeasurementAccu?.Value?.ShipUiModule?.ElementAtOrDefault(i);
   
    Host.Log("measure module.");
    // take multiple measurements of module tooltip to reduce risk to keep bad read tooltip.
    Sanderling.MouseMove(NextModule);
    Sanderling.WaitForMeasurement();
    Sanderling.MouseMove(NextModule);
}

}
[/code]
Not bad for someone that can’t code C.

Tested and definitely working when measure tooltips bugs out this code will try again for you till measure tooltips works correctly .

1 Like