Jump to content

Search the Community

Showing results for tags 'objcreate clsid cuiautomation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. About a year ago I made a UI automation library but still wondering if it cannot be more easily done without usage AutoITObject Any input on background why below will not work with AutoIT ObjCreate and UIAutomationcore.dll library (W7 32 and 64 bits) Basically I am trying to create 1. CUIAutomation object 2. As there is normally no registrykey with this UIAutomationCore.DLL the only workaround is to use CLSID (as within C++ we call CoCreateInstance References http://msdn.microsoft.com/en-us/library/windows/desktop/ff384838(v=vs.85).aspx UI Automation API is not having a com object in registry registered and as such also in VBA createobject will not work (needs a progid) as opposed to NEW statement Code sample I tried so far (latest version of AutoIt) HotKeySet("{ESC}", "Terminate") ;********** THIS WORKS ******************* ;~ $oExcel = ObjCreate("Excel.Application") ; Create an Excel Object ;~ $oExcel.Visible = 1 ; Let Excel show itself ;~ $oExcel2 = ObjCreate("{00024500-0000-0000-C000-000000000046}") ; Create an Excel Object ;~ $oExcel2.Visible = 1 ; Let Excel show itself ;***************************************** ;********** THIS WORKS NOT *************** $sCLSID_CUIAutomation="{FF48DBA4-60EF-4201-AA87-54103EEF594E}" ; $oCUIAutomation=ObjCreate("{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}") ; $oCUIAutomation=ObjCreate("{ff48dba4-60ef-4201-aa87-54103eef594e}") ; $oCUIAutomation=ObjCreate("{944DE083-8FB8-45CF-BCB7-C477ACB2F897}") ; $oCUIAutomation=ObjCreate("{FF48DBA4-60EF-4201-AA87-54103EEF594E}") ;~ $oCUIAutomation=ObjCreate("FF48DBA4-60EF-4201-AA87-54103EEF594E") $oCUIAutomation=ObjCreate($sCLSID_CUIAutomation) ;~ Trial when registry keys are added ;~ $oCUIAutomation=ObjCreate("CUIAutomation.Application") ;***************************************** ;~ if isobj($oCUIAutomation) Then ;~ msgbox "Hello cuiautomation" consolewrite($oCUIAutomation.GetRootElement.CurrentClassName) ;~ endIf while True sleep(100) WEnd Func Terminate() Exit 0 EndFunc ;==>Terminate ;***************************************** ;~ Windows Registry Editor Version 5.00 ;~ [HKEY_CLASSES_ROOT\CUIAutomation.Application] ;~ @="Microsoft UI Automation Application" ;~ [HKEY_CLASSES_ROOT\CUIAutomation.Application\CLSID] ;~ @="{FF48DBA4-60EF-4201-AA87-54103EEF594E}" ;~ [HKEY_CLASSES_ROOT\CUIAutomation.Application\CurVer] ;~ @="CUIAutomation.Application.7" ;***************************************** ;~ VBA samples ;~ Works without registry modifications ;~ Sub test() ;~ Dim c As New CUIAutomation ;~ Debug.Print c.GetRootElement.CurrentClassName ;~ End Sub ;~ ;~ Works when registry is modified ;~ Sub test() ;~ Dim c As CUIAutomation ;~ Set c = CreateObject("CUIAutomation.Application") ;~ Debug.Print c.GetRootElement.CurrentClassName ;~ End Sub
×
×
  • Create New...