blinkdt Posted June 16, 2004 Share Posted June 16, 2004 Been awhile since I've visited this board, it just gets better and better. Was looking for help on installing Webroot's Window Washer, found some references in the forums to include one member who asked that he be PM'd for an AutoIt routine to install this program (but I can no longer locate the thread!). Haven't heard from him, so here's what I came up with:SplashTextOn, 290, 110, Installation in Progress, Installing Window Washer 5.5...Sleep, 2000SplashTextOff;Install Window Washer 5.5Run, %systemdrive%\\Extras\\WindowWasher\\setup.exeSleep, 500WinWaitActive, Window Washer, Setup will now install Window WasherSend, {ENTER}WinWaitActive, Window Washer Installation, I AgreeSend, {TAB 2}{ENTER}WinWaitActive, Window Washer, tabOptionsSend, {TAB 4}{DOWN}{SPACE}{TAB 4}{ENTER}WinWaitActive, Window Washer, tabInstallPathSend, {TAB 3}{SPACE},{DOWN}{SPACE}{DOWN 3}{SPACE}{TAB 2}{ENTER}Sleep, 22000WinWaitActive, Window WasherLeftClick, 340, 280WinWaitActive, Window Washer, tabPluginScanLeftClick, 114, 154LeftClick, 114, 172Send, {TAB}{ENTER}WinWaitActive, Window Washer, FinishedSend, {ENTER}run, regedit /s "%systemdrive%\\Extras\\WindowWasher\\prefs.reg"For those not familiar with AutoIt, it is similar to VBS sendkeys, I suppose. I am NOT a coder (I live vicariously through my coder friends) and AutoIt is intuitive enough for me to use.The prefs.reg file is a combination of two registry entries:1. [HKEY_CURRENT_USER\Software\Webroot]2. [HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell\Washer]@="&Shred Contents"and[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell\Washer\Command]@="\"C:\\Program Files\\Webroot\\Washer\\wwShred.exe\" \"/recycle\""Note: the entries found in the second instance are drawn from HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}, I just run a search on the default naming convention found when a user right-clicks on the Recyle Bin and discovers the amazingly long name given to the shred option by Window Washer. Yeesh. I suppose one only needs the first entry that actually renames the Recycle Bin text, but hey....The routine is thrown in to a larger AutoIt routine that is run at reboot. I copy that routine into the Startup folder using a batch file that is activated via RunOnceEx.cmd, which is activated via cmdlines.txt. After some playing around, I was able to get the whole thing to self-destruct at the end of the routine from within the AutoIt routine itself. Whew, hope that's confusing to you, too! Link to comment Share on other sites More sharing options...
ZoSTeR Posted June 16, 2004 Share Posted June 16, 2004 Using send keys and mouse clicks with coordinates is always a little risky. The safer way is to send commands to the controls (buttons, edit boxes etc).Use the AutoIt Spy to get their names.WinWait ("Window Washer 5.5 Setup")ControlClick ("Window Washer 5.5 Setup", "", "Button1");Continue Setup Yes ButtonWinWait ("Window Washer Installation")ControlClick ("Window Washer Installation", "", "TButton1");I Agree ButtonControlClick ("Window Washer Installation", "", "TCheckBox4");Is unchecked by defaultControlClick ("Window Washer Installation", "", "TCheckBox3")ControlClick ("Window Washer Installation", "", "TCheckBox2")ControlClick ("Window Washer Installation", "", "TCheckBox1")ControlClick ("Window Washer Installation", "", "TButton4");Next ButtonControlSetText ("Window Washer Installation", "", "TEdit1", "C:\Programme\WebWasher" );Change Install PathControlClick ("Window Washer Installation", "", "TCheckBox4")ControlClick ("Window Washer Installation", "", "TCheckBox3")ControlClick ("Window Washer Installation", "", "TCheckBox2")ControlClick ("Window Washer Installation", "", "TCheckBox1")ControlClick ("Window Washer Installation", "", "TButton7");Install ButtonJust comment out the options you want to leave checked. Link to comment Share on other sites More sharing options...
blinkdt Posted June 17, 2004 Author Share Posted June 17, 2004 ZoSTeR, very cool, thanks. But when you mention "Use the AutoIt Spy," I'm at a loss. Is 'AutoIt Spy' a reference to the AutoIt Reveal Mode tool, is it a new feature built into version 3, or is it an add-on tool that someone is selling? Sounds great, I have to get my hands on it. Link to comment Share on other sites More sharing options...
blinkdt Posted June 17, 2004 Author Share Posted June 17, 2004 Spoke too soon, Zoster, found it as part of version 3. I will have to gear up from version 2 and give this a try, thanks again. Link to comment Share on other sites More sharing options...
Cee-Kay Posted June 24, 2004 Share Posted June 24, 2004 Thanks ZoSTeR for the script I had never heard of AutoIT before finding this thread!Most of the script works fine, but I seem to experiencing problems with the 'Install' button Despite copying your script and configuring the specific options, I can't get it to automatically click the 'Install' button -- is this by design?I would also like to configure the plug-ins settings, I take it I am able to do this just like the other checkbox options as per your script? Link to comment Share on other sites More sharing options...
ZoSTeR Posted June 24, 2004 Share Posted June 24, 2004 The script above is not complete. It's an example of how to manipulate controls with AutoIt.Sometimes AutoIt is a little fast with clicking the controls. Try adding a Sleep (500) before each command and see if that works.Use the AutoIt Spy to get the rest of the control names and follow the scheme in the script. Link to comment Share on other sites More sharing options...
Cee-Kay Posted June 24, 2004 Share Posted June 24, 2004 The script above is not complete. It's an example of how to manipulate controls with AutoIt.Thanks, I understand enough to of your script to see how AutoIT interacts with certain objects.Sometimes AutoIt is a little fast with clicking the controls. Try adding a Sleep (500) before each command and see if that works.I tried that for the screens preceeding the 'Install' button and I did notice a slight delay, however the script seems to close when it reaches the screen with the 'Install' button (this happens both when I use the Sleep command and when I don't)Use the AutoIt Spy to get the rest of the control names and follow the scheme in the script.Using the AutoIT Spy it lists the 'Install' button as:Class: TButton7 Text: Next >Despite the caption being 'Install' would/does this make any difference or am I missing some commands from my script as you said your script is not complete? 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