Rod Posted June 7, 2009 Share Posted June 7, 2009 Hi Everyone I am very new to writing scripts and am having a problem. I am trying to auto update Malwarebytes and cannot get my script to click the update tab. I have tried MouseClick and MouseMove without sucess and cannot use ControlClick as there is no ControlID please see attached file I have tried the following scripts can some please point me in the right direction Run("C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe") WinWaitActive("Malwarebytes' Anti-Malware", "perform full scan") MouseMove(435, 343, 1) Run("C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe") WinWaitActive("Malwarebytes' Anti-Malware", "perform full scan") MouseClick("left", 572, 284) Thanks in advance Rod Link to comment Share on other sites More sharing options...
hydroxide Posted June 9, 2009 Share Posted June 9, 2009 I don't have MalwareBytes .. but doesn't the app have any keyboard shortcuts to assist you in navigation? Perhaps you could start from the field that's first in focus after you've launched the app, and then use a combination of keyboard shortcuts (hotkeys) and tab order till you get to your Update field? Link to comment Share on other sites More sharing options...
GEOSoft Posted June 9, 2009 Share Posted June 9, 2009 (edited) See ControlCommand() in the Help file Along the lines of ControlCommand("Title", "", "[Class:SysTabControl32; Instance:1]", "TabRight", "") Also look at "CurrentTab" for the same Function. Also remember that Tabs are generally 0 based so the first tab will be 0 the second 1 & Etc: EDIT: The exact information can be obtained by using the AutoIt Window Info Tool. Edited June 9, 2009 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
rover Posted June 9, 2009 Share Posted June 9, 2009 Hi Everyone I am very new to writing scripts and am having a problem. I am trying to auto update Malwarebytes and cannot get my script to click the update tab. Thanks in advance RodI would have posted what many experienced users here would when someone is automating an installercheck the help file for command line option switchesI have MalwareBytesmy desktop shortcut"C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe" /runupdatecheers I see fascists... Link to comment Share on other sites More sharing options...
Rod Posted June 9, 2009 Author Share Posted June 9, 2009 I would have posted what many experienced users here would when someone is automating an installer check the help file for command line option switches I have MalwareBytes my desktop shortcut "C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe" /runupdate cheers First of all Thanks you Everyone for your assistance. Unfortunatley I could not manipulate my way to the tabs with any of the shortcut keys. I also tried the controlcommand option but when I looked in the autoit window all the malwarebyte tabs had the same SysTabControl32 and instance of 1. I solved my issue with option 3 using the below script. I did not know MalwareBytes had any command line options. Next time I will read a bit more before trying to reinvent the wheel. Run("C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe /runupdate") Sleep(120000) Run("C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe /quickscanterminate") Exit Thanks Again http://www.autoitscript.com/forum/style_im...icons/icon1.gif 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