Balaji4u Posted April 23, 2010 Posted April 23, 2010 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
veronesi Posted April 23, 2010 Posted April 23, 2010 Hi, try this code: ShellExecute("wordpad.exe") WinWaitActive("Document - WordPad") Send("Hello.") WinClose("Document - WordPad") WinWaitActive("WordPad") Send("!n") Best Regards Veronesi
Balaji4u Posted April 23, 2010 Author Posted April 23, 2010 On 4/23/2010 at 10:51 AM, 'veronesi said: 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now