Sending a message to an OS X app (Mac OS X)

I have a Mac OS X plugin. I’d like

  1. to send a simple message to a specific app in applications folder (it is an app that I wrote too… call it MyApp
  2. Receive a message from MyApp when MyApp sends it to my plugin
  3. Run (launch) MyApp from my JUCE plugin

The message doesn’t need to have lots of data in it. Just something simple like an integer. (Like sendMessage on Windows.

Is this possible within a JUCE plugin? If so, how

Yes, you can do that with an InterProcessConnection.
You can probably run the app from the plugin as well, but I would advise against, since your Plugin can exist in multiple instances…

I guess ChildProcess should work, you could modify it and create another pipe (to send back to the App, for now it’s just reading what the app would send you, not writing back). Then you do the same trick with the dup2 calls to route the pipes to cout and cin.

Thanks for the replies. That’s a big help, and I’ll let you know how it turns out.