So, I want to write a program or a script that does the following:
* Contains a list of IP addresses, passwords, and game names
* Allows the user to choose one of the game names
* Enters the IP address and password into Civ4 (/Warlords)
There is one way I know that would accomplish this, but inefficiently, and not significantly superior to keeping a copy/paste text file. (Select a game name, copies IP to clipboard, then manually activate Warlords, paste, go back, copy IP, go back, paste.)
There are two ways I imagine that could accomplish this "better", one in VB and one through scripting (which I know nothing about and thus only guess this might be possible).
1. VB: Have a program that runs in the background. Set in that program key combos for different games, i.e. ctrl-shift-1 through 9. Go into Civ4, get to the point of entering an ip, select the IP text box, hit ctrl-shift-1 or whatever; VB program automatically enters the IP (presumably via sending events to the event handler, keypressed events or whatever?) and enters "tab" and enters password for that game.
I don't know if two things here are possible: 1. if it's possible to have a background program waiting for a particular keypress combination, and 2. if one program can send keypress events to another program (or in any given other way send information to a program that's not particularly looking out for such information).
There are other variations I could imagine for this, but I don't really know enough of what is possible to enumerate them.
2. Scripting: Through scripting somehow send the information to the program (like in 1.), or if that's not possible, through scripting edit (or copy) the .ini file for Civ4 that contains the default IP address. This is not particularly useful, because typically PTBS players (like me) would, well, play lots of games at the same time and probably aren't interested in restarting Civ4 from scratch for each game. But it might be marginally useful.
Is this possible (particularly the while-civ4-is-running method(s) )? Does anyone have a suggestion for where I can find information on how to do it, if it is possible? I googled around a bit and found nothing useful to me, but I know so little about scripting and about 'windows' VB (I know VB as in inside-a-program VB, but not about affecting other programs with VB) that nothing I came up with was relevant, presumably because I don't know what to look for ...
TIA
* Contains a list of IP addresses, passwords, and game names
* Allows the user to choose one of the game names
* Enters the IP address and password into Civ4 (/Warlords)
There is one way I know that would accomplish this, but inefficiently, and not significantly superior to keeping a copy/paste text file. (Select a game name, copies IP to clipboard, then manually activate Warlords, paste, go back, copy IP, go back, paste.)
There are two ways I imagine that could accomplish this "better", one in VB and one through scripting (which I know nothing about and thus only guess this might be possible).
1. VB: Have a program that runs in the background. Set in that program key combos for different games, i.e. ctrl-shift-1 through 9. Go into Civ4, get to the point of entering an ip, select the IP text box, hit ctrl-shift-1 or whatever; VB program automatically enters the IP (presumably via sending events to the event handler, keypressed events or whatever?) and enters "tab" and enters password for that game.
I don't know if two things here are possible: 1. if it's possible to have a background program waiting for a particular keypress combination, and 2. if one program can send keypress events to another program (or in any given other way send information to a program that's not particularly looking out for such information).
There are other variations I could imagine for this, but I don't really know enough of what is possible to enumerate them.
2. Scripting: Through scripting somehow send the information to the program (like in 1.), or if that's not possible, through scripting edit (or copy) the .ini file for Civ4 that contains the default IP address. This is not particularly useful, because typically PTBS players (like me) would, well, play lots of games at the same time and probably aren't interested in restarting Civ4 from scratch for each game. But it might be marginally useful.
Is this possible (particularly the while-civ4-is-running method(s) )? Does anyone have a suggestion for where I can find information on how to do it, if it is possible? I googled around a bit and found nothing useful to me, but I know so little about scripting and about 'windows' VB (I know VB as in inside-a-program VB, but not about affecting other programs with VB) that nothing I came up with was relevant, presumably because I don't know what to look for ...
TIA

Comment