How can I implement a cargoIsFull flag based on a messageBoxes trigger?

I have an issue with one of my scripts. It navigate a lot of systems and sometimes I get a full cargo after picking up my Mobile Tractor Unit.

A msgbox with the message “Not Enough Cargo Space” appear and due to the way MTU works, I don’t have access to the relevant .selectedContainerCapacityGauge as a trigger to stop trying to loot.


While the msgbox is open I cannot interact with the rest of the screen so I need to close it. But after closing it the bot needs to know that it received a not enough cargo space error. It is the only way to know that my main cargo holder is full at this frame.

How could I use botmemory to remember that it received this error and act accordingly?

Got it. It was simpler than what I expected.

cargoFullMsgBox =
            case getDescendantWithDisplayTextContain "Not Enough Cargo Space" msgox.uiNode of
                Nothing ->

                Just _ ->

cargoFullFlag =
            if botMemoryBefore.cargoFullMsgBox == True then


If cargoFullFlag is true I stop looting and go back home.

1 Like