Jump to content

Script crashes windows


Recommended Posts

Hi ,

I am new to autoit and started off with some examples . I wrote a script to open a word pad and write some text and close it .

My script looks like this.

Run ("wordpad.exe")

WinWaitActive("Document - WordPad")

Send("Hello.")

WinClose("Document - WordPad")

WinWaitActive("Wordpad", "Do you want to save")

Send("!n")

Now this looks fine to me , but not to windows. It literally crashes the task Bar nothing functions .

Any idea whats wrong ?. Even just using "Run" command to open a notepad or a word pad doesnt work .

R

B

Link to comment
Share on other sites

Hi,

Thanks for the reply , this code works fine.

Regards,

Balaji

try this code:

ShellExecute("wordpad.exe")
WinWaitActive("Document - WordPad")
Send("Hello.")
WinClose("Document - WordPad")
WinWaitActive("WordPad")
Send("!n")

Best Regards

Veronesi

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...