Showtime2kX Posted September 23, 2010 Share Posted September 23, 2010 (edited) I've created a script to try and make "SpywareBlaster" automatically update. I'm having problems getting the very last line to work with this particular script. Run("C:\Program Files\SpywareBlaster\spywareblaster.exe") Winwait("SpywareBlaster") Sleep(3000) ; Open Updates window ControlClick("SpywareBlaster","","[ClassNN:ThunderRT6UserControlDC21]","left",1,67,280) Sleep(2000) Send("{ENTER}") Sleep(10000) ControlClick("SpywareBlaster","","[ClassNN:ThunderRT6UserControlDC20]","left",1,77,33);Opens "Protection Status" window Sleep(3000) If ControlClick("SpywareBlaster","","[ClassNN:ThunderRT6FormDC1]","",1,69,392) Then Sleep(2000) MsgBox(64, 'Info:', 'The control Exists, should have been clicked') Else MsgBox(64, 'Error', 'You have something wrong there') EndIf I've tried it several different ways. I've tried using the ID number, class, and classNN, but nothing works. Even tried changing the coords several different times. I've made sure to double and triple check my code and the "Control" window settings to make sure everything is correct. BTW: The MsgBox appears positively. Meaning that the click is occurring, but apparently not in the right location. SpywareBlaster is the very latest version, V4.4. Thanks in advance. Edited September 23, 2010 by Showtime2kX Link to comment Share on other sites More sharing options...
omikron48 Posted September 23, 2010 Share Posted September 23, 2010 You don't need to supply coordinates for ControlClick. Not unless clicking in the middle of the control is unacceptable. Link to comment Share on other sites More sharing options...
Showtime2kX Posted September 23, 2010 Author Share Posted September 23, 2010 You don't need to supply coordinates for ControlClick. Not unless clicking in the middle of the control is unacceptable.Okay. Can you give me an example of what a line of code should look like then? (w/o coords) Link to comment Share on other sites More sharing options...
somdcomputerguy Posted September 23, 2010 Share Posted September 23, 2010 ControlClick("SpywareBlaster","","[ClassNN:ThunderRT6UserControlDC21]") ControlClick("SpywareBlaster","","[ClassNN:ThunderRT6UserControlDC20]");Opens "Protection Status" window ControlClick("SpywareBlaster","","[ClassNN:ThunderRT6FormDC1]") - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Showtime2kX Posted September 23, 2010 Author Share Posted September 23, 2010 ControlClick("SpywareBlaster","","[ClassNN:ThunderRT6UserControlDC21]") ControlClick("SpywareBlaster","","[ClassNN:ThunderRT6UserControlDC20]");Opens "Protection Status" window ControlClick("SpywareBlaster","","[ClassNN:ThunderRT6FormDC1]") This won't work. The thing I need to click on isn't a button, but a small link within an entire class that contains several different links. I've attached a picture below, for those of you who haven't used SpywareBlaster. I'm trying to click the "Enable All Protection" link on the final line. Any other ideas? Link to comment Share on other sites More sharing options...
Showtime2kX Posted September 24, 2010 Author Share Posted September 24, 2010 Figured it out. The coords, for some reason, were WAY off. I figured this out by using "MouseClick" instead. Opt ("MouseCoordMode", 0) WinMinimizeAll() Run( @ProgramFilesDir & "\SpywareBlaster\spywareblaster.exe" ) WinWaitActive("SpywareBlaster") WinActivate("SpywareBlaster") Sleep(2000) MouseClick("left", 187, 363) Sleep(1500) Send("{ENTER}") Sleep(10000) MouseClick("left", 65, 131) Sleep(1500) MouseClick("left", 300, 480) Sleep(10000) WinClose("SpywareBlaster") MsgBox(64, "Success", "SpywareBlaster has been successfully updated!") 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