am632 Posted June 5, 2009 Posted June 5, 2009 (edited) Hi all, Im trying to makea script which opens the add hardware wizard and clicks next bla on the options i want. But the script keeps closin itself after like the 3rd window. Here is my script Run("control.exe hdwwiz.cpl") WinWaitActive("Add Hardware Wizard", "&Next >") Send("{ENTER}") ;Searches for hardware at this point WinWaitActive("Add Hardware Wizard") Send("{SPACE}") Send("{ENTER}") Ok, whilst it is searching for hardware, the script closes (you can see the autoit icon disappear near the clock) and it wont continue at the next screen - the one where it asks if your hardware is already connected or not. Please can anyone help me out cos its a right pain in the a*s* thanks Edited June 5, 2009 by am632
qazwsx Posted June 5, 2009 Posted June 5, 2009 (edited) Does the title of the window change after you click next? It may be sending the keys while the window is searching for hardware. Perhaps put in a sleep? Also use consolewrite to see how far the program is running. Edit: And use a codebox Edited June 5, 2009 by qazwsx
am632 Posted June 5, 2009 Author Posted June 5, 2009 Hi, tnx for the reply. I checked the window title but that was the same. Just tried the sleep and worked like a charm. Is there a way to make the script stay open untill it reaches the end tho? Thanks And sorry bout the code box, i neva realised there was one
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