forger Posted August 6, 2008 Share Posted August 6, 2008 Hello, I think I found a bug related to windows vista and a tutorial in autoit help file I opened autoit help file > AutoIt v3 > Tutorials > simple notepad automation and pasted the full script at the end of the tutorial in an autoit script file: Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("This is some text.") WinClose("Untitled - Notepad") WinWaitActive("Notepad", "Do you want to save") Send("!n") The problem is that it doesn't work with "Do you want to save" text string. It works in Windows XP though! Link to comment Share on other sites More sharing options...
Triblade Posted August 6, 2008 Share Posted August 6, 2008 I've tested this and confirmed it. This is because WinWaitActive("Notepad", "Do you want to save") doesn't work. AutoIt just can't find this window and keeps waiting for it. If the following would be omitted it works. , "Do you want to save" My active project(s): A-maze-ing generator (generates a maze) My archived project(s): Pong3 (Multi-pinger) Link to comment Share on other sites More sharing options...
herewasplato Posted August 7, 2008 Share Posted August 7, 2008 Hello, I think I found a bug related to windows vista and a tutorial in autoit help file...Yep - I thought so too when I posted this as a bug. The answer was:The tutorial teaches folks to use the "AutoIt Window Info" tool. Had they done so, the final script would function on the OS that they are using. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
PoojaKrishna Posted August 7, 2008 Share Posted August 7, 2008 Please select the option run as administartor by right click on the exe to execute it. Link to comment Share on other sites More sharing options...
herewasplato Posted August 7, 2008 Share Posted August 7, 2008 Please select the option run as administartor by right click on the exe to execute it.I do not think that there is an exe involved in that tut. It is being run as an au3 text file. And the problem stems from the fact that the tut was written using info from XP. Then the screenshots and code was updated for Vista. An attempt was made to find code that would work for both XP and Vista - but it did not workout that way. Look at the screenshot where "Do you want to save" is circled in red. That text does not even show up as visible text in the window info tool shown in the same screenshot. AutoIt cannot see the text "Do you want to save" and yet it is in the code just below that screenshot:WinWaitActive("Notepad", "Do you want to save")/rant [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
forger Posted August 11, 2008 Author Share Posted August 11, 2008 (edited) Sorry for replying so late As herewasplato says, shouldn't the text from message boxes be recognized in vista? Or it should be at least mentioned for which operating systems they work or not, especially for useful commands such as WinWaitActive Edited August 11, 2008 by forger Link to comment Share on other sites More sharing options...
herewasplato Posted August 12, 2008 Share Posted August 12, 2008 ... shouldn't the text from message boxes be recognized in vista? ...It is Vista that changed the way that the info within that message box is presented. Vista made it like a browser window and the text inside cannot be seen... or so I'm told - I've stayed away from Vista as best I can.... Or it should be at least mentioned for which operating systems they work or not, especially for useful commands such as WinWaitActive ...You can try your hand at a bug report. [size="1"][font="Arial"].[u].[/u][/font][/size] 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