Via submarine, they sent a message to the base on Midway instructing personnel there to radio Pearl Harbor that the salt-water evaporators on the base had broken down. Two days later, a Japanese message was intercepted that reported “AF” was running out of fresh drinking water.
https://www.history.com/news/battle-midway-codebreakers-allies-pacific-theater