Sign in to follow this  
Followers 0
ahenric

Process control

3 posts in this topic

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Both are build by me (AutoIt programs). Wanted to use the same program to do both. Thanks for the tip with the ini file. Didn't know what keywords to use to look for in the forums.

Share this post


Link to post
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
Sign in to follow this  
Followers 0