luckyluke Posted April 10, 2014 Share Posted April 10, 2014 Hi all Im working with sample code from this page: '?do=embed' frameborder='0' data-embedContent>> The example code is Example 4 that demonstrates the calculator The error i get when run this code is: --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop matched: class30012 Matching: 30012 for CalcFrame "C:\Program Files\AutoIt3\Include\UIAWrappers.au3" (553) : ==> Variable must be of type "Object".: $objUIAutomation.createPropertyCondition($PropertyId, $tVal, $pCondition) $objUIAutomation^ ERROR ->21:51:53 AutoIt3.exe ended.rc:1 +>21:51:53 AutoIt3Wrapper Finished.. Please help Thanks Link to comment Share on other sites More sharing options...
LarsJ Posted April 10, 2014 Share Posted April 10, 2014 I have downloaded and run the example right now. I'm not getting any errors.In top of the script Calculator and Notepad are opened. Can you see if these programs are opened. If not just comment out these two lines and open the programs yourself. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
jdelaney Posted April 10, 2014 Share Posted April 10, 2014 (edited) Add a check to make sure that the variable is an object, prior to using properties|methods IsObj you might need to add a loop to wait for it to be an object Edited April 10, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
luckyluke Posted April 11, 2014 Author Share Posted April 11, 2014 (edited) I have downloaded and run the example right now. I'm not getting any errors. In top of the script Calculator and Notepad are opened. Can you see if these programs are opened. If not just comment out these two lines and open the programs yourself. Add a check to make sure that the variable is an object, prior to using properties|methods IsObj you might need to add a loop to wait for it to be an object Hi i've check in UIAWrappers.au3 and found that the script can not create object func _UIA_Init() ;~ consolewrite("initializing") ;~ The main object with acces to the windows automation api 3.0 $objUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation) If IsObj($objUIAutomation) = 0 Then msgbox(1,"UI automation failed", "UI Automation failed",10) Return SetError(1, 0, 0) EndIf $objUIAutomation = 0 so it's not a object. Im using Autoit version 3.3.10.2. What should i do now? Edited April 11, 2014 by luckyluke Link to comment Share on other sites More sharing options...
LarsJ Posted April 11, 2014 Share Posted April 11, 2014 What platform are you on? This should run from XP SP3 to Win 8. If you are on XP or Vista there may be a risk that the API isn't installed. See http://support.microsoft.com/kb/971513. Can you verify that UIAutomationCore.dll is installed on your system? Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
luckyluke Posted April 17, 2014 Author Share Posted April 17, 2014 What platform are you on? This should run from XP SP3 to Win 8. If you are on XP or Vista there may be a risk that the API isn't installed. See http://support.microsoft.com/kb/971513. Can you verify that UIAutomationCore.dll is installed on your system? Hi, im using XP SP3. I've searched for UIAutomationCore.dll and found it in system32 folder, so i think it's installed Link to comment Share on other sites More sharing options...
LarsJ Posted April 17, 2014 Share Posted April 17, 2014 I have just tested on my old XP SP3. It works.luckyluke, It seems as if UI Automation isn't working on your PC. You can try to install the UI Automation update in the link, and you can try to update everything on your PC with Microsoft Update, if you haven't done that. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
junkew Posted April 19, 2014 Share Posted April 19, 2014 Try example 1 or the simple spy example first. Some examples can be broken FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets 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