st4vr0s Posted June 6, 2008 Share Posted June 6, 2008 Hi Guys, I'm still getting my head around Autoit. Not doing too bad so far but have run into a problem. I am trying to click a button in a window that doesn't have a title. Here is a screenie of what I'm trying to do. I'll apoligise in advance if I'm being a n00b Thanks Link to comment Share on other sites More sharing options...
newbiescripter Posted June 6, 2008 Share Posted June 6, 2008 (edited) Try this: I'm leaving the title blank but then declare the text insted. ControlClick("","Drivers has been updated Succesfully.","Button1","left",1) Regards EDIT: You could also just use the class like this: ControlClick("[CLASS:#32770]","","Button1","left",1) Edited June 6, 2008 by newbiescripter Link to comment Share on other sites More sharing options...
st4vr0s Posted June 6, 2008 Author Share Posted June 6, 2008 (edited) Try this: I'm leaving the title blank but then declare the text insted. ControlClick("","Drivers has been updated Succesfully.","Button1","left",1) Regards The controlclick command worked beautifully, however I need to put a winwait, winactivate, winwaitactive in there somehow to make it wait while installing drivers. Thanks Edited June 6, 2008 by st4vr0s Link to comment Share on other sites More sharing options...
newbiescripter Posted June 6, 2008 Share Posted June 6, 2008 The controlclick command worked beautifully, however I need to put a winwait, winactivate, winwaitactive in there somehow, while it is installing drivers?? Thanks Use the class of the window then like this: WinWaitActive("[CLASS:#32770]") Link to comment Share on other sites More sharing options...
st4vr0s Posted June 6, 2008 Author Share Posted June 6, 2008 Yeah I thought that should do the trick but it doesn't work. Is it possible to add visible text to the line so that it can wait then controlclick? Link to comment Share on other sites More sharing options...
st4vr0s Posted June 6, 2008 Author Share Posted June 6, 2008 Tried a few options including, Run ("C:\WinTVCD 4_4\HcwDriverInstall.exe") WinWait ("","[CLASS:#32770]","Drivers have been updated Successfully") WinWaitActive ("","[CLASS:#32770]","Drivers have been updated Successfully") WinActivate ("","Drivers have been updated Successfully") ControlClick ("","Drivers have been updated Successfully","Button1","left",1) Still no joy. Only way so far which is a little crude is .. Run ("C:\WinTVCD 4_4\HcwDriverInstall.exe") Sleep(30000) ControlClick ("","Drivers have been updated Successfully","Button1","left",1) Any suggestions? Thanks Link to comment Share on other sites More sharing options...
newbiescripter Posted June 6, 2008 Share Posted June 6, 2008 Try this: ;Using the text of the control Do Sleep(200) Until ControlCommand("","Drivers has been updated Succesfully.","Button1","IsVisible","") ControlClick("","Drivers has been updated Succesfully.","Button1","left",1) ; using the class of the window Do Sleep(200) Until ControlCommand("[CLASS:#32770]","","Button1","IsVisible","") ControlClick("[CLASS:#32770]","","Button1","left",1) I would use the last one I think.. Regards Link to comment Share on other sites More sharing options...
st4vr0s Posted June 9, 2008 Author Share Posted June 9, 2008 newbiescripter, Second one worked a treat, will add it to the deployment box to see if it works in a task sequence. Many thanks for the assistance! 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