You can't. unless you have an app on that other machine that is listening for that message.
The main issue is your data packets will be blocked by the other machine's firewall/router. The port will not be open. If the remote machine is connected to your machine, then a port will be open and you can try to send something to that other app.
So, without configuring the remote system's network, and having an app or a known "hack", you cannot just send anything to another machine. Hackers with viruses can do this because their virus connects to a "home server", where they can then send commands to the virus app.
Same rules apply, there has to be something looking for your data, and that data has to be over a port that is open at both ends of the network.