How does one go about taking control of a program that is running on Windows?
Basically, I want to take control a program and tell it to exit properly (because if it exits on its own, it saves a bunch of data automatically. If I just kill the PID, then nothing gets saved).
After figuring out the classname from spy.exe, I am able to do this:
use Win32::GUI; $smartboardHandle = Win32::GUI::FindWindow("TMainform", "");
to get a handle for the program and I know the next step would be to issue SendMessage commands but since I don't know the API of the program, I think I am SOL (unless there is a standard message that says "Hey, why don't you close").
I have tried Win32::Process but invariably, I all I can do is kill the PID and that doesn't get the "Save and Close" I am looking for.
So any Windoze hackers have any clues for me?
Thanks,
Mdog
In reply to Controlling a program in Windows by mdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |