automatically click OK to close a dialog box

I've got a program, which show me dialog box with a message and OK button to close it. I have to click on it nearly thousand times, which is impossible. Unfortunately this is very specific program, it's in beta now, but I have to use it. Developers were notified, but it may take a lot of time till I get a new version.
So as a temporary workaround may be I can find a small (better free) utility to automatically click OK and close this dialog once it appears. It should not affect my other work on the computer. Can anybody help?
I'm working under Windows XP Pro SP2.
LVL 15
Who is Participating?
iUsernameConnect With a Mentor Commented:
Try the following autoit code.
you need to enter the dialog box title, and you can enter another parameters to WinWaitActive() that contains the text in the dialog box.

While True
	; wait for the dialog box window
	WinWaitActive("dialog box title here")

Open in new window

use FindWindow() function to find the window, and than send the message WM_CLOSE to the window.

If you MUST click on the OK button, you can use GetWindow() to get to the next child window (probably the button OK, or keep on going until you find that button, and send to it WM_CLICK.

You can use AutoIt 3 to write such a script real fast and easy.
yuk99Author Commented:
I'm not going to develop this program myself. AutoIt3 may be a good solution. Will study. Can you help me with a script? To wait for a window with exact title and click OK.
yuk99Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.