People and Places Window(for freight autopilot)

Hello guys. Maybe someone has an example of a simple script for the PeopleandPlaces Window. I’m writing a script for the freight from the station to the hub. I have troubles in parsing the Places tab.

Can you describe where’s your problem or what precisely do you want to achieve? Can’t understand why would you need People and Places window for auto-pilot

Can you describe where’s your problem or what precisely do you want to achieve? Can’t understand why would you need People and Places window for auto-pilot

The coordinates need to set the waypoint (bokmarks). In the main menu, no stations are not located in the system. Ofcource I can use the code from minig script but it is not very convenient and cumbersome. (Set bookmark for gate → warp to gates (0m)-> warp to another systems → set stantion of unload → war to station (0m) → docking) It is only from one system to another, and if you need to go through several systems?
So I think that the method of use mining.ore script is not suitable

The logic of my future script as follows:

1 Loading station (MainStep)

  • Check availability of items in stock (loading)
  • If the items is empty - stop script.
  • If there is items - load the ship.
  • set the route to the unloading station (bookmark in settings (eg string unloading station = “Jita”
  • undock and: return AutoPilotUnloadStep;

2 Autopilot script (AutoPilotUnloadStep)

  • waiting for complete
  • check if docking: return UnloadStep;

3 Unloading station (UnloadStep)

  • Check availability of items in orehold
  • unload ship.
  • set the route to the loading station (bookmark in settings (eg string loading station = “Perimetr”
  • undock and: return AutoPilotLoadStep;

4 Autopilot script (AutoPilotUnloadStep)

  • waiting for complete
  • check if docking: return MainStep;

People and Places Window (set the route)

People and Places Window (set the route)
//bookmarks
string UnloadingStation = “Jita”;

  • Check People and Places Window (If not open - open)
  • Go to the Places tab - mouse right (if not open)
  • In Personal Locations find and select the bookmarks which are specified in the settings (mouse right)
    +/- Click the left mouse on bokmark
    +/- In menu - select “Set Destination”

“+” - It has already done.
“-” - I can not understand.
“+/-” - It may be done after the “-”

Thank you.

  • Check People and Places Window (If not open - open)
  • Go to the Places tab - mouse right (if not open)
  • In Personal Locations find and select the bookmarks which are specified in the settings (mouse right)
    +/- Click the left mouse on bokmark
    +/- In menu - select “Set Destination”

“+” - It has already done.
“-” - I can not understand.
“+/-” - It may be done after the “-”

Go to the Places tab

I assume leftclicking on the tab label would achieve this. The label in the tab header is contained in “LabelText”, so I was able to get a reference to the label in the tab header with this expression:

WindowPnP?.LabelText?.FirstOrDefault(label =>   label?.Text?.RegexMatchSuccessIgnoreCase(@"^s*placess*$") ?? false)

In Personal Locations find and select the bookmarks which are specified in the settings

I guess you want to compare the string from your settings with the value from the “Label” column. I would try these methods:

static public IEnumerable<Sanderling.Interface.MemoryStruct.IListEntry> EntrySubsetWithLabelMatching(WindowPeopleAndPlaces window, string regexPattern, RegexOptions regexOptions = RegexOptions.None) =>     window?.ListView?.Entry?.Where(entry => entry?.CellValueFromColumnHeader("Label")?.RegexMatchSuccess(regexPattern, regexOptions) ?? false);  static public IEnumerable<Sanderling.Interface.MemoryStruct.IListEntry> EntrySubsetWithLabelEqualsIgnoreCase(WindowPeopleAndPlaces window, string labelText) =>     EntrySubsetWithLabelMatching(window, @"^s*" + labelText + @"s*$", RegexOptions.IgnoreCase);

I tried to do something like this::

void EnsureWindowPeopleAndPlacesOpen()
{
if (null != WindowPeopleAndPlaces)
	return;

Host.Log("Open window PeopleAndPlaces.");
Sanderling.MouseClickLeft(Measurement?.Neocom?.PeopleAndPlacesButton);
}

void SetWayPointForUnloadStation()	{

         EnsureWindowPeopleAndPlacesOpen();       Host.Delay(1111);

var Places = Measurement?.WindowPeopleAndPlaces?.FirstOrDefault()?.LabelText?.FirstOrDefault( text => text.Text.RegexMatchSuccess("Places") );
Sanderling.MouseClickLeft(Places);

Host.Log("Open Places tab.");		Host.Delay(1111);

var UnloadingStation = Measurement?.WindowPeopleAndPlaces?.FirstOrDefault()?.LabelText?.FirstOrDefault( text => text.Text.RegexMatchSuccess("UnloadStationBookmark") );
ClickMenuEntryOnMenuRoot(UnloadingStation, "Set Destination");

Host.Log("Open menuentry for UnloadStationBookmark");
}

Thanks for your reply. I’m studying your code. I still question how to make a bookmark from the code into individual settings? like this:

string UnloadStationBookmark = "Jita";

I do it! of course it as I could… smile It works under Russian localization. I compiled the Russian file to make it easier to try out the script. If it could be improved please join.

16.03.04 Sanderling (russian)   VirusTotal  AutoTransportToHub.cs

Autopilot constantly opens the route menu. The new version of the bot, I have not yet translated

Also bot clicks are sometimes not there where it is necessary (when the coordinate sets), for this I made a small test (return to start step). I do not know why it happens)). Start script from loading station.


update: Overwrite the files. Found a mistakes that prevented a continuous cycle.