I am currently working on a program that will take data from a txt file, and fill in some information in another program. My code reads the data in the correct format from the txt file however, i do not know how to tell my program to 'alt+tab' to another program that's already open in windows.
Thanks in Advance
Hmmm, let me give an example. Let's say Internet Explorer is open and sitting down in the tray. I need to make my c++ program bring up Internet Explorer so it can enter data into a field (i.e. enter text into the search bar or address bar) In my case however the program isn't Internet Explorer it's a different program that has fields to put different data in. Also, I've tried looking into the system command and something called Create Process but i can't seem to do exactly what i need to do. The program i need to gain access too is already open, i need to bring it up and be able to enter text data into different fields.
Thanks for the help, greatly appreciated
I see your point. In that I suppose it would really help if you had the source of this second program, such that you could modify it by adding a mechanism to reload some ini file on file change or alternatively have a specific folder where such ini data time stamped updates are stored ad processed. The first program will be responsible for creating these ini updates for the second program to use.
Having a folder of multiple updates that are stored will provide a good solution for second program to process these updates in its own time, as opposed to these updates (on text fields of prgram2) being overwritten when 2nd program is not yet finished with current changeset.
This mechanism with some extra work could also be extended to utilised sockets as opposed to a file based system for transfer of updates.
The client (the 2nd program) will then have to buffer these updates so that it can process them in its own time.
If you don't have access to the source of the 2nd program then you might be able to use hooks from the 1st program to control 2nd. This solution may not be easy to implement as one cannot trully know the actual state of the 2nd program - ie it might be unsafe to hook into program2 and apply changes at certain times ...