Jump to content
Sign in to follow this  

AutoIT Close Office Save / Don't Save Prompt

Recommended Posts


I want to close (click on save or don't save ) following Microsoft Office Save / Don't save prompt window using AutoIt(python version).

I tried based on the example given here : https://pypi.python.org/pypi/PyAutoIt/0.3



Here is my code:

import autoit
autoit.control_click("[Class:#NUIDialog]", "Button1")

Also tried

autoit.control_click("[CLASS:NetUIHWND; INSTANCE:1]", "Button1")

However, I'm getting fowling error :( :

Traceback (most recent call last):
  File "officetest.py", line 6, in <module>
    autoit.control_click("[CLASS:NetUIHWND; INSTANCE:1]", "Button1")
  File "c:\python27\lib\site-packages\pyautoit-0.3-py2.7.egg\autoit\autoit.py", line 80, in wrapper
    raise AutoItError(err_msg)
autoit.autoit.AutoItError: send click message failed


Can anyone please point out what am I doing wrong ?

Thanks in Advance.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this