tags:

views:

169

answers:

3

I want to make a Python script that automates the process of setting up a VPN server in Windows XP, but the only way I know how to do it is using the Windows GUI dialogs. How would I go about figuring out what those dialogs are doing to the system and designing a Python script to automate it?

+1  A: 

You could use SendKeys to send keystrokes to the dialogs in question, and a few extra tricks if you also need mouse actions.

Or, you could use StraceNT to monitor all the system calls made as you manually go through the dialogs, and reproduce them in Python with either the Python win32 extensions or ctypes.

Alex Martelli
I think strace is what I need but I don't think its going to work as everything happens in explorer. there's just too much going on to isolate the right calls. Any advice?
tehr
A: 

Find out how to do what you want using commands (on the command line) and script these commands instead.

hasen j
this seems like the best idea but I have no idea how to do this via commandline. Any idea where I should start looking?
tehr
@tehr, I'm not familiar with the tools you're using, but I'd assume there's something about this burried somewhere on MSDN
hasen j
A: 

Take a look at SIKULI - there have been some reports of less-than-perfect operation in Windows but it is really simple to play around with and get a simple script up and running.

swanson