You could do this with the Network library. The running program implements a Server object and occasionally checks the Pending property. The program that wants to send the information implements a Client and connects to the server when required.
An example is here
Network "library"