I’ve been trying to learn and code a bot for myself but i’m running into some snags, specifically i cant seem to menurootclick on an item in my cargo hold. As is the code searches the inventory, but doesnt select the probes/right click show info correctly. For this code, i want to simply right click the remaining object after searching my cargo bay and show info. If you could also be so kind as to show me how to read the number of x object stored in my hold as well it would be greatly appreciated. Sorry for format im unsure how to do that.
using BotSharp.ToScript.Extension;
using MemoryStruct = Sanderling.Interface.MemoryStruct;
using Parse = Sanderling.Parse;
Sanderling.Parse.IWindowInventory WindowInventory => Measurement?.WindowInventory?.FirstOrDefault();
var Measurement = Sanderling?.MemoryMeasurementParsed?.Value;
var ManeuverType = Measurement?.ShipUi?.Indication?.ManeuverType;
string ProbeName = “Sisters Core”;
ShowInfo();
void ShowInfo()
{
Sanderling.MouseClickLeft(WindowInventory?.InputText?.FirstOrDefault());
Sanderling.TextEntry(ProbeName);
var ShowItemInfo = WindowInventory?.SelectedRightInventory?.ListView?.Entry?.ToArray();
var ShowInfo = ShowItemInfo?.FirstOrDefault();
ClickMenuEntryOnMenuRoot(ShowInfo, “Show Info”);
}
void ClickMenuEntryOnMenuRoot(IUIElement MenuRoot, string MenuEntryRegexPattern)
{
Sanderling.MouseClickRight(MenuRoot);
var Menu = Measurement?.Menu?.FirstOrDefault();
var MenuEntry = Menu?.EntryFirstMatchingRegexPattern(MenuEntryRegexPattern, RegexOptions.IgnoreCase);
Sanderling.MouseClickLeft(MenuEntry);
}