0

So I'm fairly new to C++ and I'm wondering if this would be possible and what the code would look like.

I'm trying to create an ongoing process that monitors when a certain program does something and launches another program when that thing happens.

Example:

I have Steam open and begin downloading a game, my mystery process sees this download start and executes a command to open another program.

Is this possible? I'm just curious and, with a little help, would like to write something like this for personal use (and learning). Sorry for the noobish-ness

Thanks!

4
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by Ancient Dragon
0

Maybe a Windows API call (like a process alert thing?) i'm not a windows guy, so i wouldn't know, but that's my guess

0

Yes it is possible. You have to work with your OS api.

And it is easy, in Linux just observe running processes and conditionally create a new thread and use execv() to run a specific program.

0

Interesting, thanks for the replies. I'm definitely looking into APIs (using Windows atm), hopefully it's as easy a task on other OSes as it is on Linux!

0

Looking for running processes won't help with that problem because it doesn't tell you what the processes are doing. Launching other programs is the easy part, just a win32 api function call. Watching what other processes are doing will be a lot more complicated.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.