wolfbartels Posted July 3, 2007 Share Posted July 3, 2007 I want to write an AutoIt-script to switch on and off a certain Add-On in Internet Explorer ver. 6 After opening the window 'Extras / AddOns verwalten...' (in English should be something like 'Tools / AddOn-Manager...') how can I read the lines with the names of the several AddOns? 'AutoIt-Windows-Info' does not show the names. What kind of control is used by Microsoft in this window? Can a certain AddOn be activated/deactivated by AutoIt? And if so, how? Thanks in advance, Wolf Link to comment Share on other sites More sharing options...
Reaper HGN Posted July 5, 2007 Share Posted July 5, 2007 If you dont mind using the "Windows Scripting" part of AutoIT (ie macro to interact on top of the window vs code to interact behind the scenes) you can do something like this:pseudo codewinactivate an IE windowsend keys ALT T A - send(!TA)when the manager window pops up, winactivate the manager windowsend keys TAB (to get to the addon window from the drop down)send keys <name of the addon typed in full> - that will select the addon directly. Example, send "RESEARCH" to select the Research addonsend ALT D - send(!D) - this will disable the addon, or ALT E to enableHandle the warning window that pops up and then close the managerI realize there are a number of ways this can go wrong. That is one of the issues with the macro approach.. I try to use controlclick, controlsend or one of the "control" commands in lieu of macro manipulation when I can.Good luck. Link to comment Share on other sites More sharing options...
tAKTelapis Posted July 5, 2007 Share Posted July 5, 2007 The other option is to use the registry:http://support.microsoft.com/kb/883256That has a short bit of info in it on where they are in the registry, and it is rather simple to see how it all works.This (on my machine at least, i am not sure if the CLSID is the same for everyones) Disables the Messenger Addon for Internet Explorer.Deleting this key appears to enable it.Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{FB5F1910-F110-11D2-BB9E-00C04F795683}] "Flags"=dword:00000001 "Version"="*"To get the key for the object you wish to toggle, simply goto:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\in your registry, then open IE, and disable the item, once you have exited IE, refresh the registry (F5) and the new key should be the one you want..HTH/tAK Link to comment Share on other sites More sharing options...
wolfbartels Posted July 7, 2007 Author Share Posted July 7, 2007 @ Reaper HGNsend keys <name of the addon typed in full> - that will select the addon directly. Example, send "RESEARCH" to select the Research addonThat's what I didn't know. Thanks!Me too, I try to use controlclick, controlsend or one of the "control" commands in lieu of macro manipulation when I can, but in this IE-dialog I could not find a control command to select the desired addon. Is it really a new kind of control AutoIt cannot manage (yet) ? Link to comment Share on other sites More sharing options...
wolfbartels Posted July 7, 2007 Author Share Posted July 7, 2007 @ Reaper HGNsend keys <name of the addon typed in full> - that will select the addon directly. Example, send "RESEARCH" to select the Research addonUnfortunately the name of the addon typed in full does not work, only one letter is used by the control for selection on IE6. I want to select 'Shockwave ...', with Send("S") the selection goes to 'Search ...', if such an Add-On exists.Thanks anyhow for your good intention. Link to comment Share on other sites More sharing options...
Reaper HGN Posted July 9, 2007 Share Posted July 9, 2007 Hmm, that is perplexing that you couldnt get it to work. I had to go load Shockwave to test it for myself. Below is my simple approach. It is not without its potential issues, but in its most basic form, this script worked through several tests to disable the shockwave control in Internet Explorer. expandcollapse popupOpt("WinTitleMatchMode", 2) ;allows us to look for Microsoft Internet Explorer in a title If ProcessExists("IEXPLORE.EXE") Then ;give focus to "a" single IE window WinActivate("Microsoft Internet Explorer", "") ;open the manager addon window Send("!ta") ;wait for the new window to come up WinWait("Manage Add-ons") ;give new window focus - it should already have it, but I like to be safe than sorry WinActivate("Manage Add-ons", "") ;press tab to move selection from drop down to control window Send("{TAB}") ;select Shockwave ActiveX Control directly Send("Shockwave ActiveX Control") ;wait a micro sec Sleep(10) ;just for good measure. ;disable the control Send("!d") ;wait for the window to come up WinWait("Add-on Status") ;press the ok button ControlClick("Add-on Status", "", "Button1") ;wait for the window to go away, then give focus to original window and click ok Sleep(100) WinActivate("Manage Add-ons", "") ControlClick("Manage Add-ons", "", "Button7") Exit Else MsgBox(0, "Not running", "Internet Explorer not running.") ;You could actually start IE if you wanted, rather than just reporting it as not running EndIf 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