shahino007 Posted December 26, 2013 Share Posted December 26, 2013 Hey I'm trying to access a properties table and automaticaly edit its values (not in IE but in external program), but seems that I cannot get into the table using the regular commands. When I'm using the Autoit v3 Window Info, it gives me the class name of the table as: BCGPPropList:400000:8:10011:10, INSTANCE:1 Is there any special set of commands related to properties table? Thanks, Shahino007 Link to comment Share on other sites More sharing options...
orbs Posted December 26, 2013 Share Posted December 26, 2013 maybe this will be useful to you: '?do=embed' frameborder='0' data-embedContent>> or you may need to explain yourself more clearly (screenshot will be helpful). Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
shahino007 Posted December 26, 2013 Author Share Posted December 26, 2013 It's not possible to attach a screen shot of the table because its in a stand alone computer and data cannot be extracted from it (restrictions in my work place) I'll try to explain myself more clearly: I have a property table in an application. This table consists of main topics which are treeview like (Header, data, Footer) It is possible to expand those topics and see their children. An extended topic includes property table with two colomns. The left colomn consists of property fields (name, id, ext..). the right colomn consists of the values of those properties. I don't know how its possible to access those values and edit them Hope its more clear... Link to comment Share on other sites More sharing options...
orbs Posted December 26, 2013 Share Posted December 26, 2013 AutoIt is shipped with a Window Info tool: Start > Programs > AutoIt v3 > AutoIt Window Info it can tell you all about the controls and contents of a window. for example, it can tell you the Control ID, which can be used in a script to retrieve or change data of the control. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
shahino007 Posted December 26, 2013 Author Share Posted December 26, 2013 As I said before: When I'm using the Autoit v3 Window Info, it gives me the class name of the table as: BCGPPropList:400000:8:10011:10, INSTANCE:1 I use it instead of control ID (the Window Info doesn't give me any control ID for this control) Its not classic TreeView control so the TreeView commands don't apply here. Its of PropertyList type, and for that I don't know what to use Link to comment Share on other sites More sharing options...
LarsJ Posted December 26, 2013 Share Posted December 26, 2013 You should take a look at the UI Automation framework. You find it here. 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...
shahino007 Posted December 26, 2013 Author Share Posted December 26, 2013 Thanks, Couldn't find enything relevant to my case. I think the focus needs to be on commands that handle BCGPPropList controls. Its only a hunch.. Link to comment Share on other sites More sharing options...
LarsJ Posted December 26, 2013 Share Posted December 26, 2013 Have you downloaded the UDFs in the bottom of the first post and have you run the "Simple spy demo" in the codebox in the middle of the first post? Then you'll see if the UI Automation framework is able to identify your controls. You should try 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...
shahino007 Posted December 29, 2013 Author Share Posted December 29, 2013 Can't run Spy demo and the first automation script because I don't have ObjCreateInterface function. Can you please provide it? Link to comment Share on other sites More sharing options...
LarsJ Posted December 29, 2013 Share Posted December 29, 2013 ObjCreateInterface is a built-in command in AutoIt 3.3.8.1 and 3.3.10.0. 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...
jchd Posted December 29, 2013 Share Posted December 29, 2013 Which AutoIt version are you testing with? Go download v3.3.10.1 and try again. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
shahino007 Posted December 30, 2013 Author Share Posted December 30, 2013 I updated th version to v3.3.10.1 Now I've encountered with new problems: When I execute the Spy_demo.au3 and press ctrl+W on the requested object (on any object actually...) I get the following error on the consule: Veriable must be on type 'Object' This happens on line 58: $objUIAtomation.ElementFromPoint($tStruct, $pIUElement) When I run the the UIAWrappers.au3 I get the message that the UI automation failed (in the first function, the _UIA_Init()) This happens immediately right after executing. The Spy_demo is related to UIAWrappers.au3 so if this doesn't work then spy_demo has a problem So I'm still stuck Link to comment Share on other sites More sharing options...
LarsJ Posted December 30, 2013 Share Posted December 30, 2013 To verify that the "Spy demo" is working you can place the mouse cursor over the edit box in the "Spy demo" GUI and press Ctrl+w. UIAWrappers.au3 is an include file and should not be run.According to this the BCG controls should support Microsoft Active Accessibility.You can run this code to get a list in Scite console of controls for the entire window that can be recgnized by the UI Automation framework:expandcollapse popup#include "CUIAutomation2.au3" Opt( "MustDeclareVars", 1 ) Global $oUIAutomation MainFunc() Func MainFunc() ;Local $hWindow = 0x0006045C ; Infragistics ;Local $hWindow = WinGetHandle( "[CLASS:WindowsForms10.Window.8.app.0.bb8560_r19_ad1]" ) ; Infragistics Local $hWindow = WinGetHandle( "[CLASS:CabinetWClass]" ) ; Windows Explorer, Windows 7 ;Local $hWindow = WinGetHandle( "[CLASS:ExploreWClass]" ) ; Windows Explorer, Windows XP ;Local $hWindow = WinGetHandle( "Windows Explorer right pane" ) ; Windows Explorer right pane ;Local $hWindow = WinGetHandle( "[TITLE:My GUI Checkbox; CLASS:AutoIt v3 GUI]" ) ; AutoIt GUI window ;Local $hWindow = WinGetHandle( "[CLASS:AutoIt v3 GUI]" ) ; AutoIt script ;Local $hWindow = WinGetHandle( "[CLASS:IEFrame]" ) ; Internet Explorer ;Local $hWindow = WinGetHandle( "Calculator" ) ; Calculator If Not $hWindow Then Return $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation ) If Not IsObj( $oUIAutomation ) Then Return Local $pWindow ;$oUIAutomation.GetRootElement( $pWindow ) ; Desktop $oUIAutomation.ElementFromHandle( $hWindow, $pWindow ) ; Window If Not $pWindow Then Return Local $oWindow = ObjCreateInterface( $pWindow, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oWindow ) Then Return ;ListDescendants( $oWindow, 0, 1 ) ; Desktop ListDescendants( $oWindow, 0, 0 ) ; Window EndFunc Func ListDescendants( $oParent, $iLevel, $iLevels = 0 ) If Not IsObj( $oParent ) Then Return If $iLevels And $iLevel = $iLevels Then Return Local $pRawWalker, $oRawWalker $oUIAutomation.RawViewWalker( $pRawWalker ) $oRawWalker = ObjCreateInterface( $pRawWalker, $sIID_IUIAutomationTreeWalker, $dtagIUIAutomationTreeWalker ) Local $pUIElement, $oUIElement $oRawWalker.GetFirstChildElement( $oParent, $pUIElement ) $oUIElement = ObjCreateInterface( $pUIElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) Local $sIndent = "" For $i = 0 To $iLevel - 1 $sIndent &= " " Next While IsObj( $oUIElement ) ConsoleWrite( $sIndent & "Title = " & _UIA_getPropertyValue( $oUIElement, $UIA_NamePropertyId ) & @CRLF & _ $sIndent & "Class = " & _UIA_getPropertyValue( $oUIElement, $UIA_ClassNamePropertyId ) & @CRLF & _ $sIndent & "Ctrl type = " & _UIA_getPropertyValue( $oUIElement, $UIA_ControlTypePropertyId ) & @CRLF & _ $sIndent & "Ctrl name = " & _UIA_getPropertyValue( $oUIElement, $UIA_LocalizedControlTypePropertyId ) & @CRLF & _ $sIndent & "Value = " & _UIA_getPropertyValue( $oUIElement, $UIA_LegacyIAccessibleValuePropertyId ) & @CRLF & _ $sIndent & "Handle = " & Hex( _UIA_getPropertyValue( $oUIElement, $UIA_NativeWindowHandlePropertyId ) ) & @CRLF & @CRLF ) ListDescendants( $oUIElement, $iLevel + 1, $iLevels ) $oRawWalker.GetNextSiblingElement( $oUIElement, $pUIElement ) $oUIElement = ObjCreateInterface( $pUIElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) WEnd EndFunc Func _UIA_getPropertyValue( $obj, $id ) Local $tVal $obj.GetCurrentPropertyValue( $id, $tVal ) If Not IsArray( $tVal ) Then Return $tVal Local $tStr = $tVal[0] For $i = 1 To UBound( $tVal ) - 1 $tStr &= "; " & $tVal[$i] Next Return $tStr EndFunc 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...
LarsJ Posted December 31, 2013 Share Posted December 31, 2013 I have downloaded the BCGPVisualStudioGUIDemo (32 bit on XP, 64 bit on 7) from BCGSoft which contains such a BCGPPropList. The "Spy demo" works for me on both XP and 7: expandcollapse popupMouse position is retrieved 1089-510 At least we have an element [Font][] Having the following values for all properties: Title is: <Font> Class := <> controltype:= <UIA_CustomControlTypeId> ,<50025> , (0000C369) *** Parent Information *** Title is: <PropertyList> Class := <BCGPPropList:40000000:8:10003:10> controltype:= <UIA_ListControlTypeId> ,<50008> , (0000C358) *** Detailed properties of the highlighted element *** UIA_AcceleratorKeyPropertyId := UIA_AccessKeyPropertyId := UIA_AriaPropertiesPropertyId := UIA_AriaRolePropertyId := UIA_AutomationIdPropertyId := UIA_BoundingRectanglePropertyId :=1034;501;264;19 UIA_ClassNamePropertyId := UIA_ClickablePointPropertyId := UIA_ControllerForPropertyId := UIA_ControlTypePropertyId :=50025 UIA_CulturePropertyId :=0 UIA_DescribedByPropertyId := UIA_DockDockPositionPropertyId :=5 UIA_ExpandCollapseExpandCollapseStatePropertyId :=3 UIA_FlowsToPropertyId := UIA_FrameworkIdPropertyId := UIA_GridColumnCountPropertyId :=0 UIA_GridItemColumnPropertyId :=0 UIA_GridItemColumnSpanPropertyId :=1 UIA_GridItemContainingGridPropertyId := UIA_GridItemRowPropertyId :=0 UIA_GridItemRowSpanPropertyId :=1 UIA_GridRowCountPropertyId :=0 UIA_HasKeyboardFocusPropertyId :=False UIA_HelpTextPropertyId := UIA_IsContentElementPropertyId :=True UIA_IsControlElementPropertyId :=True UIA_IsDataValidForFormPropertyId :=False UIA_IsDockPatternAvailablePropertyId :=False UIA_IsEnabledPropertyId :=True UIA_IsExpandCollapsePatternAvailablePropertyId :=False UIA_IsGridItemPatternAvailablePropertyId :=False UIA_IsGridPatternAvailablePropertyId :=False UIA_IsInvokePatternAvailablePropertyId :=False UIA_IsItemContainerPatternAvailablePropertyId :=False UIA_IsKeyboardFocusablePropertyId :=True UIA_IsLegacyIAccessiblePatternAvailablePropertyId :=True UIA_IsMultipleViewPatternAvailablePropertyId :=False UIA_IsOffscreenPropertyId :=False UIA_IsPasswordPropertyId :=False UIA_IsRangeValuePatternAvailablePropertyId :=False UIA_IsRequiredForFormPropertyId :=False UIA_IsScrollItemPatternAvailablePropertyId :=False UIA_IsScrollPatternAvailablePropertyId :=False UIA_IsSelectionItemPatternAvailablePropertyId :=False UIA_IsSelectionPatternAvailablePropertyId :=False UIA_IsSynchronizedInputPatternAvailablePropertyId :=False UIA_IsTableItemPatternAvailablePropertyId :=False UIA_IsTablePatternAvailablePropertyId :=False UIA_IsTextPatternAvailablePropertyId :=False UIA_IsTogglePatternAvailablePropertyId :=False UIA_IsTransformPatternAvailablePropertyId :=False UIA_IsValuePatternAvailablePropertyId :=False UIA_IsVirtualizedItemPatternAvailablePropertyId :=False UIA_IsWindowPatternAvailablePropertyId :=False UIA_ItemStatusPropertyId := UIA_ItemTypePropertyId := UIA_LabeledByPropertyId := UIA_LegacyIAccessibleChildIdPropertyId :=33424449 UIA_LegacyIAccessibleDefaultActionPropertyId := UIA_LegacyIAccessibleDescriptionPropertyId :=Font UIA_LegacyIAccessibleHelpPropertyId := UIA_LegacyIAccessibleKeyboardShortcutPropertyId := UIA_LegacyIAccessibleNamePropertyId :=Font UIA_LegacyIAccessibleRolePropertyId :=28 UIA_LegacyIAccessibleSelectionPropertyId := UIA_LegacyIAccessibleStatePropertyId :=3145728 UIA_LegacyIAccessibleValuePropertyId :=Arial(8) UIA_LocalizedControlTypePropertyId := UIA_MultipleViewCurrentViewPropertyId :=0 UIA_MultipleViewSupportedViewsPropertyId := UIA_NamePropertyId :=Font UIA_NativeWindowHandlePropertyId :=0 UIA_OrientationPropertyId :=0 UIA_ProcessIdPropertyId :=5008 UIA_ProviderDescriptionPropertyId :=[pid:5008,hwnd:0x0 Main(parent link):Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)] UIA_RangeValueIsReadOnlyPropertyId :=True UIA_RangeValueLargeChangePropertyId :=0 UIA_RangeValueMaximumPropertyId :=0 UIA_RangeValueMinimumPropertyId :=0 UIA_RangeValueSmallChangePropertyId :=0 UIA_RangeValueValuePropertyId :=0 UIA_RuntimeIdPropertyId := UIA_ScrollHorizontallyScrollablePropertyId :=False UIA_ScrollHorizontalScrollPercentPropertyId :=0 UIA_ScrollHorizontalViewSizePropertyId :=100 UIA_ScrollVerticallyScrollablePropertyId :=False UIA_ScrollVerticalScrollPercentPropertyId :=0 UIA_ScrollVerticalViewSizePropertyId :=100 UIA_SelectionCanSelectMultiplePropertyId :=False UIA_SelectionIsSelectionRequiredPropertyId :=False UIA_SelectionselectionPropertyId := UIA_SelectionItemIsSelectedPropertyId :=False UIA_SelectionItemSelectionContainerPropertyId := UIA_TableColumnHeadersPropertyId := UIA_TableItemColumnHeaderItemsPropertyId := UIA_TableRowHeadersPropertyId := UIA_TableRowOrColumnMajorPropertyId :=2 UIA_TableItemRowHeaderItemsPropertyId := UIA_ToggleToggleStatePropertyId :=2 UIA_TransformCanMovePropertyId :=False UIA_TransformCanResizePropertyId :=False UIA_TransformCanRotatePropertyId :=False UIA_ValueIsReadOnlyPropertyId :=True UIA_ValueValuePropertyId := UIA_WindowCanMaximizePropertyId :=False UIA_WindowCanMinimizePropertyId :=False UIA_WindowIsModalPropertyId :=False UIA_WindowIsTopmostPropertyId :=False UIA_WindowWindowInteractionStatePropertyId :=0 UIA_WindowWindowVisualStatePropertyId :=0 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...
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