Vladkergan Posted December 19, 2006 Share Posted December 19, 2006 Hi folks ! I experienced some problems when trying to script with autoit on a multi windowed application. I have written the following lines : Run("c:\Program Files\Apps\AWR.exe") WinWaitActive("AWR") Send("^o") Send("c:\Program Files\Apps\macg.rwa") Send("{Enter}") WinWaitActive("macg - RR") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{Enter}") What i m trying to do is simple : - Launch the AWR app - Open a file with the AWR app - Launch a tratment on the opened file All is working file except for the last step. The problem is that the button i try to activate is on a different window than the principal one. This window appear when i open the file, and it's a button called "Run Report" i try to activate. I also tried the following : WinWaitActive("macg - RR") Send("Run Report") But it's still not working. Any ideas ? ps : I'm using autoit with TSE, if that could help (or explain the problem i'm trying to deal with). Link to comment Share on other sites More sharing options...
MHz Posted December 19, 2006 Share Posted December 19, 2006 Welcome, Try waiting for the window, activate it and then wait for it to become active. Run('"' & @ProgramFilesDir & '\Apps\AWR.exe"') WinWait("AWR") WinActivate("AWR") WinWaitActive("AWR") Send("^o") Send(@ProgramFilesDir & "\Apps\macg.rwa") Send("{Enter}") WinWait("macg - RR") WinActivate("macg - RR") WinWaitActive("macg - RR") Send("{TAB}{TAB}{TAB}{TAB}{Enter}") If possible to use, then the Control* functions are more precise with handling controls as the windows do not need to be active so WinWait would be enough. It would depend on your applications if the Control* functions can be used instead. Link to comment Share on other sites More sharing options...
1905russell Posted December 19, 2006 Share Posted December 19, 2006 Send("{TAB}{TAB}{TAB}{TAB}{Enter}") oÝ÷ Ø&§mç(ק±çm¡«¢+Ø)M¹ ÅÕ½ÐííQÑõí¹ÑÉôÅÕ½Ðì¤( Link to comment Share on other sites More sharing options...
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