Jump to content

Process control


ahenric
 Share

Recommended Posts

Hi,

I have a small tray application that waits for mouse clicks and does some stuff (switching USB controlled switch on/off) and switches an icon accordingly (basically it sits in a while loop waiting for a tray event with TrayGetMsg). Now I want to also control everything via the command line.

So ideally I want to have the program already running as above, then calling the program again via the command line. The command line program detects that already another process is running. This other process I want to control. The command line program should then exit after it is done, leaving always the original first program in the tray.

My question now is: how do I control the other process? I know how to retrieve the PID of the already running process and the command line process. So the command line process should switch my USB switch on/off, but the icon in the tray process should then also change. Is that possible?

Thanks

Link to comment
Share on other sites

Are both programs built by you? if yes, then use command line for both, or use a INI file to pass information. This has been asked many times and there are many solutions to it. Use the search function in the forum to find what you need.

If the program that you want to control is NOT built by you, then what is the name of the program? Does it have command line support? GUI interface? If it is a program you can control, how is it controlled by you if you do it manually?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...