Hi. I have problems with checking the current state of the hold (the amount of ore), I use this code: var HoldInfo = Sanderling.MemoryMeasurement.Value.WindowInventory[0].SelectedRightInventoryCapacity.Text; var HoldStatus = HoldInfo.Split(’/’)[0].Split(’,’)[0];
And I get this:
So, I can’t use String.Join() and Int32.Parse() to convert this value to Int type.
P.S. I think that most likely there is a way much easier, but I do not know it)
public interface IInventoryCapacityGauge
{
long? Used { get; }
long? Max { get; }
long? Selected { get; }
}
```
As you can see in the API explorer, the parsing already takes care of seperating the different numbers you see in the gauge.
But in the API explorer I can’t see SelectedRightInventoryCapacityMilli property. And following code: Sanderling.MemoryMeasurementParsed.Value.WindowInventory[0].SelectedRightInventoryCapacityMilli.Used does work for me( get error SystemNullReferenceException)
Ok, in that case, we should take a look at the text your eve online client displays on the capacity gauge. This is used as a source for parsing. The eve online client reuses windows regionale settings to format numbers and maybe other stuff. You might have setup your system in a way which is not yet covered by the parsing code.
A question which arises from this:
What string do you get from Sanderling.MemoryMeasurement.Value.WindowInventory[0].SelectedRightInventoryCapacity.Text?
Comparing the screenshot from your first post to this, it looks like the actual string did not make it through the forum software. Can you write it to a file in UTF-8 and post a link to that?
We already support many different formats for numbers, adapting the parsing code to add support for your formatting should be simple enough.
Thank you for the pull request, that was real quick.
However I am confused about your choice of version to base the change on. Why did you choose this particular commit as parent? Do you see a problem with the newer changes which have been added since then?
As far as the formatting goes, the process seems simple enough.
I’m new to git and I could have done something wrong if you mean it. Or I misunderstood you)[quote=“Viir, post:13, topic:264”]
As far as the formatting goes, the process seems simple enough.
[/quote]
By the way, I could easily parse the text file with an example, using the code that is shown in the 1 post, but can’t do here in the Sanderling.
I see. In this case, I will simply take the change you added and translate it to our main development branch (called “master” in the repository).
This translation will make the change end up in the product.
I don’t understand. Why do you think there are bugs?
The screenshot looks like you are using some unsupported software to view this.
In case you are not familiar with the choice of tools, I recommend to use Visual Studio 2017 to open the solution file. (The free “Community” edition is sufficient)
Oh, I understand. I’m use VS 2015 now, and it does not want to compile this code. [quote=“Viir, post:18, topic:264”]
I don’t understand, why discouraged
[/quote]
Actually, I did this:
I opened the version for 17.02.
Changed one line “static readonly string CapacityGaugeUnitPattern =" (m | m) ³ ";”
Compiled the program.
But it’s work with some bugs, when I type a code in the Sanderling editor, I get exeptions like this. Although this exception should not relative to this.
Yes, I saw the same problem with 2015, I solved it by switching to version 2017.
The file you linked shows this was an OutOfMemoryException. That happens when the program runs out of memory address space. I just checked here to see how much memory it actually neede.
Having the default mining script loaded in the IDE and typing (see the screenshot below), it used almost one GB. You should have at least as much free memory available when using the Sanderling IDE.