How do I use C++ to interact with other applications?

I know my post is going to be vague, and that is a lot to do with me posting something in this forum for the first time. I am no expert in C++. I'm practising writing small applications via command line tool, and am quite interested in cocoa right now although I have no idea how to start. My question is, I want an idea of how applications generally interact with other applications. For example, applications that auto-reply text on skype or Naver Line OS X. I'm not asking for a set of codes or anything, but I want an idea of how that works, and what is used etc. Thank you very much. Oh and if I am posting in the wrong place or something, please tell me. I'm new here. I need to learn.
I'm not sure how feasable your goals are, but I would look into IPC
Communication between programs on Linux or *nix systems sypically happen through a Socket File.

https://en.wikipedia.org/wiki/Socket_file

I don't know how other operating systems implement this mechanism, but you should be able to take it from here. I'm sure you can do the research yourself.

There is also one other possible way: raising a signal. Most operating system typically operate using an asynchronous event-based design. You can see how this might be an effective medium for "notifying" a program that somthing has happened. A program can be written so that it intercepts certain signals sent to it. This is actually how "dd" works in Linux: it intercepts the USR1 (iirc) signal and outputs the status of the operation (which is how the user is supposed to know how far it is in it's copy or delete or whatever "sudo kill -USR1 $(pgrep -x "dd")").
Last edited on
Topic archived. No new replies allowed.