funkey Posted August 29, 2011 Share Posted August 29, 2011 Here I have an older function of mine to find and list installed ActiveX controls, so you can use some of them to show in your Gui. expandcollapse popup#include <Array.au3> Local $aCOMObjects = _GetCOMObjectControls() _ArrayDisplay($aCOMObjects, "All") $aCOMObjects = _GetCOMObjectControls("Control") _ArrayDisplay($aCOMObjects, "Control") GUICreate("COM-Test", 620, 500) Local $oFileSearch = ObjCreate("CompatUI.SelectFile.1") Local $oPivot = ObjCreate("OWC11.PivotTable.11") If IsObj($oFileSearch) Then GUICtrlCreateObj($oFileSearch, 10, 10, 600, 25) If IsObj($oPivot) Then GUICtrlCreateObj($oPivot, 10, 100, 600, 383) ;~ $oPivot.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=True;" & _ ;~ "Extended Properties=\'DSN=MS Access Database;" & _ ;~ "DBQ=" & @ScriptDir & "test.mdb;\;" & _ ;~ "Initial Catalog=" & @ScriptDir & "\test" ;~ $oPivot.DisplayToolbar = True EndIf GUISetState() Do Sleep(10) Until GUIGetMsg() = -3 Func _GetCOMObjectControls($sFilter = "") ;funkey Local $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2") Local $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ClassicCOMClassSetting where Control = True AND ProgId Like '%" & $sFilter & "%'", "WQL", 48) If Not IsObj($colItems) Then Return SetError(1, 0, "") Local $sRet For $objItem In $colItems $sRet &= $objItem.ProgId & @TAB $sRet &= $objItem.Caption & @CR Next Local $aTemp = StringSplit($sRet, @CR, 2) If @error Then Return SetError(1) Local $aRet[UBound($aTemp) - 1][2] For $i = 0 To UBound($aTemp) - 2 $aRet[$i][0] = StringLeft($aTemp[$i], StringInStr($aTemp[$i], @TAB, 0, -1) - 1) $aRet[$i][1] = StringTrimLeft($aTemp[$i], StringInStr($aTemp[$i], @TAB, 0, -1)) Next Return $aRet EndFunc ;==>_GetCOMObjectControls Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
UEZ Posted August 30, 2011 Share Posted August 30, 2011 Could be useful sometime, thanks for sharing. I added an array sort which makes the overview much easier. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
JohnOne Posted August 30, 2011 Share Posted August 30, 2011 Very useful to me, I've oten wondered about what is available on my computer. Just need to figure out if I can do anything with them Thanks for share. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
wakillon Posted August 30, 2011 Share Posted August 30, 2011 Interesting function. Thanks to share. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts 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