
FordsFinest
Members-
Posts
15 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
FordsFinest's Achievements

Seeker (1/7)
2
Reputation
-
Currently have a VBA macro that goes online to search for a picture. I got to the point of finding the picture but haven't been able to copy it or save it to file so I figured i'd try Autoit now. UIA Spy has found the image within the tree scope, but I do not know any functions of UIA that can copy that image to the clipboard, or save to file. Any help here would be appreciated.
-
I'm using the UIA Spy Tool (as I do quite often now) to aide in some IE Automation. The Spy Tool can detect the window, elements, etc. just like normal, but my script to control this window will not work. It works fine on the previous windows within the program, just not this one. Any help here would be appreciated. Thanks. My Script Shown below: ; Create UI Automation object Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation ) ; Get Desktop element Local $pDesktop, $oDesktop $oUIAutomation.GetRootElement( $pDesktop ) $oDesktop = ObjCreateInterface( $pDesktop, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) ; --- Find Report Criteria Screen --- Local $pCondition3 $oUIAutomation.CreatePropertyCondition( $UIA_NamePropertyId, "FIS ODB Report Criteria Screen - Internet Explorer provided by Ford Motor Company", $pCondition3 ) Local $pWindow3, $oWindow3 $oDesktop.FindFirst( $TreeScope_Descendants, $pCondition3, $pWindow3 ) $oWindow3 = ObjCreateInterface( $pWindow3, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) ; --- Click Template Drop Down --- Local $pCondition4 $oUIAutomation.CreatePropertyCondition( $UIA_NamePropertyId, "Open", $pCondition4 ) Local $pButton1, $oButton1 $oWindow3.FindFirst( $TreeScope_Descendants, $pCondition4, $pButton1 ) $oButton1 = ObjCreateInterface( $pButton1, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) $oButton1.Invoke()
-
_GUICtrlTreeView_ClickItem issues
FordsFinest replied to FordsFinest's topic in AutoIt General Help and Support
Well that makes me feel a lot better! I’ll try the new code out first thing Monday! Thanks for the info! -
FordsFinest reacted to a post in a topic: _GUICtrlTreeView_ClickItem issues
-
I have a macro that works well on 95% of computers. However, I am running into an issue on a couple computers where the _GUICtrlTreeView_ClickItem clicks the wrong item (an item or two below the correct one). Both the ExpandItem and SelectItem command work fine, just the click item is off on these computers (and only their user names). I'm not sure if some temp file somewhere is causing an issue or what. Note, using ONLY selectitem results in inconsistent focusing (item appears focused but the next command won't always work correctly). Hence my need to use the clickitem command. Any help would be appreciated. _GUICtrlTreeView_Expand($hWnd, $Array2[$i]) ;Expand $model Sleep(250) _GUICtrlTreeView_SelectItem($hWnd, $Array2[$i]) ;Select $model Sleep(150) _GUICtrlTreeView_ClickItem($hWnd, $Array2[$i]) ;Click $model Sleep(150) EndIf
-
Have come across an issue where I use the below code to select and then click an item. It works great on every computer but one, which happens to be my bosses computer (of course right lol). So SelectItem works fine, but for some reason, the ClickItem command keeps clicking the item below the correct item (but only on this computer. I changed the command to controlsend instead, but i'd rather use the click option.. any ideas here? _GUICtrlTreeView_SelectItem($hWnd, $Array2[1]) _GUICtrlTreeView_ClickItem($hWnd, $Array2[1], "right")
-
FordsFinest reacted to a post in a topic: get LegacyAccessibleName from item in TreeView. UIAutomation
-
LarsJ reacted to a post in a topic: get LegacyAccessibleName from item in TreeView. UIAutomation
-
Man...I can't express my gratitude enough. It worked great! I used StringInStr to check the items in the array and then _GUICtrlTreeView_ClickItem... I'm not sure why I was having the previous trouble. I used UIA to select an item, but once I invoked a button to "Set Sample Size", it brought up a menu for the wrong tree item. Everything in the UIASpy said it the correct tree item was selected, focused, etc, matching exactly as if I had clicked the tree item with my own mouse. But still the issue was occurring. But this works great and i'll be using it for many other things now too!
-
FordsFinest reacted to a post in a topic: get LegacyAccessibleName from item in TreeView. UIAutomation
-
Hey @LarsJ, let me know if I should create a new thread, but this still kind of falls under this post... Is it possible to read all the names of the children under Plant into an array? Then do the same thing with LAP_VOW.. I've had more success using standard action buttons. The software hasn't been consistent when using UIA. Since UIA is still the only way I know to read the names of the items in the tree view, I was hoping to make an array of them and then use a For loop to look through the array and click an item with standard action buttons.
-
LarsJ reacted to a post in a topic: get LegacyAccessibleName from item in TreeView. UIAutomation
-
FordsFinest reacted to a post in a topic: get LegacyAccessibleName from item in TreeView. UIAutomation
-
Ah. Found a work around for the title issue since class name kept changing too. I used WinGetTitle("[ACTIVE]"). Now that just leaves me with the tree issue. I've tried activating the window prior to looking for the tree, as well as looking for the parents of the tree first but no success... $oUIAutomation OK $oDesktop OK --- Find "Reporting Client - Perceptron - Navigation" window --- $pCondition0 OK $oWindow1 OK --- Find treeview --- $pCondition1 OK $oTree1 ERR
-
Good idea, see below. And for accessing the treeview, do I need to access each of it's parents first? It looks like it's buried within 3 parent panes. Treeview Element Window: Reporting Client - Perceptron - [Navigation] Element Properties (identification) $UIA_ClassNamePropertyId Afx:00400000:8:00010007:00000000:1F1F0EE5 $UIA_ControlTypePropertyId $UIA_WindowControlTypeId $UIA_NamePropertyId Reporting Client - Perceptron - [Navigation] Element Properties (session unique) $UIA_NativeWindowHandlePropertyId 0x0000000000720DAE $UIA_ProcessIdPropertyId 3652 $UIA_RuntimeIdPropertyId 42,7474606 Element Properties (information) $UIA_BoundingRectanglePropertyId l=-1928,t=-8,w=1936,h=1176 $UIA_FrameworkIdPropertyId Win32 $UIA_LocalizedControlTypePropertyId window $UIA_ProviderDescriptionPropertyId [pid:2640,hwnd:0x720DAE Main:Nested [pid:3652,hwnd:0x720DAE Annotation(parent link):Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main:Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Nonclient:Microsoft: Non-Client Proxy (unmanaged:uiautomationcore.dll); Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)] Element Properties (has/is info) $UIA_HasKeyboardFocusPropertyId False $UIA_IsContentElementPropertyId True $UIA_IsControlElementPropertyId True $UIA_IsDataValidForFormPropertyId False $UIA_IsEnabledPropertyId True $UIA_IsKeyboardFocusablePropertyId True $UIA_IsOffscreenPropertyId False $UIA_IsPasswordPropertyId False $UIA_IsRequiredForFormPropertyId False Control Patterns (element actions) $UIA_IsLegacyIAccessiblePatternAvailablePropertyId True $UIA_IsTransformPatternAvailablePropertyId True $UIA_IsWindowPatternAvailablePropertyId True Control Pattern Properties $UIA_LegacyIAccessibleChildIdPropertyId 0 $UIA_LegacyIAccessibleDefaultActionPropertyId $UIA_LegacyIAccessibleDescriptionPropertyId $UIA_LegacyIAccessibleHelpPropertyId $UIA_LegacyIAccessibleKeyboardShortcutPropertyId $UIA_LegacyIAccessibleNamePropertyId Reporting Client - Perceptron - [Navigation] $UIA_LegacyIAccessibleRolePropertyId 10 = $ROLE_SYSTEM_CLIENT $UIA_LegacyIAccessibleStatePropertyId 1048576 = $STATE_SYSTEM_FOCUSABLE $UIA_LegacyIAccessibleValuePropertyId $UIA_TransformCanMovePropertyId False $UIA_TransformCanResizePropertyId False $UIA_TransformCanRotatePropertyId False $UIA_WindowCanMaximizePropertyId True $UIA_WindowCanMinimizePropertyId True $UIA_WindowIsModalPropertyId False $UIA_WindowIsTopmostPropertyId False $UIA_WindowWindowInteractionStatePropertyId $WindowInteractionState_ReadyForUserInteraction $UIA_WindowWindowVisualStatePropertyId $WindowVisualState_Maximized Control Pattern Methods LegacyIAccessible Pattern Methods DoDefaultAction() Select(long) SetValue(wstr) GetIAccessible(idispatch*) CurrentChildId(int*) CurrentDefaultAction(bstr*) CurrentDescription(bstr*) CurrentHelp(bstr*) CurrentKeyboardShortcut(bstr*) CurrentName(bstr*) CurrentRole(uint*) CurrentState(uint*) CurrentValue(bstr*) GetCurrentSelection(ptr*) Transform Pattern Methods Move(double,double) Resize(double,double) Rotate(ushort) CurrentCanMove(long*) CurrentCanResize(long*) CurrentCanRotate(long*) Window Pattern Methods Close() SetWindowVisualState(long) WaitForInputIdle(int,long*) CurrentCanMaximize(long*) CurrentCanMinimize(long*) CurrentIsModal(long*) CurrentIsTopmost(long*) CurrentWindowVisualState(long*) CurrentWindowInteractionState(long*) Parents from Desktop Pane: Desktop Parent to child index
-
FordsFinest reacted to a post in a topic: get LegacyAccessibleName from item in TreeView. UIAutomation
-
Nice! I've ran into a couple problems though. The Reporting Client Window name will often have a different ending (e.g. Reporting Client - Perceptron - Navigation - [Navigation], etc.) The first four words stay the same, but will sometimes have something else added. I've typically used a wildcard to get around this but it didn't like it here... But, for now, I updated the name and ran it again but haven't been able to get it past the first "Find treeview" section. $oUIAutomation OK $oDesktop OK --- Find "Reporting Client - Perceptron - Navigation" window --- $pCondition0 OK $oWindow1 OK --- Find treeview --- $pCondition1 OK $oTree1 ERR I used your UIASpy tool to recreate the sample code for the tree and everything seemed to match, so I'm not sure why it's not finding the tree. Treeview Element Tree: SysTreeView32 Element Properties (identification) $UIA_ClassNamePropertyId SysTreeView32 $UIA_ControlTypePropertyId $UIA_TreeControlTypeId Element Properties (session unique) $UIA_NativeWindowHandlePropertyId 0x00000000002E09B0 $UIA_ProcessIdPropertyId 8664 $UIA_RuntimeIdPropertyId 42,3017136 Element Properties (information) $UIA_BoundingRectanglePropertyId l=-1917,t=190,w=586,h=921 $UIA_FrameworkIdPropertyId Win32 $UIA_LocalizedControlTypePropertyId tree $UIA_ProviderDescriptionPropertyId [pid:3552,hwnd:0x2E09B0 Main:Nested [pid:8664,hwnd:0x2E09B0 Annotation(parent link):Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main:Microsoft: TreeView PRoxy (unmanaged:uiautomationcore.dll)]; Nonclient:Microsoft: Non-Client Proxy (unmanaged:uiautomationcore.dll); Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)] Element Properties (has/is info) $UIA_HasKeyboardFocusPropertyId True $UIA_IsContentElementPropertyId True $UIA_IsControlElementPropertyId True $UIA_IsDataValidForFormPropertyId False $UIA_IsEnabledPropertyId True $UIA_IsKeyboardFocusablePropertyId True $UIA_IsOffscreenPropertyId False $UIA_IsPasswordPropertyId False $UIA_IsRequiredForFormPropertyId False Control Patterns (element actions) $UIA_IsLegacyIAccessiblePatternAvailablePropertyId True $UIA_IsSelectionPatternAvailablePropertyId True Control Pattern Properties $UIA_LegacyIAccessibleChildIdPropertyId 0 $UIA_LegacyIAccessibleDefaultActionPropertyId $UIA_LegacyIAccessibleDescriptionPropertyId $UIA_LegacyIAccessibleHelpPropertyId $UIA_LegacyIAccessibleKeyboardShortcutPropertyId $UIA_LegacyIAccessibleNamePropertyId $UIA_LegacyIAccessibleRolePropertyId 35 = $ROLE_SYSTEM_OUTLINE $UIA_LegacyIAccessibleStatePropertyId 1048580 = $STATE_SYSTEM_FOCUSED+$STATE_SYSTEM_FOCUSABLE $UIA_LegacyIAccessibleValuePropertyId $UIA_SelectionCanSelectMultiplePropertyId False $UIA_SelectionIsSelectionRequiredPropertyId True Control Pattern Methods LegacyIAccessible Pattern Methods DoDefaultAction() Select(long) SetValue(wstr) GetIAccessible(idispatch*) CurrentChildId(int*) CurrentDefaultAction(bstr*) CurrentDescription(bstr*) CurrentHelp(bstr*) CurrentKeyboardShortcut(bstr*) CurrentName(bstr*) CurrentRole(uint*) CurrentState(uint*) CurrentValue(bstr*) GetCurrentSelection(ptr*) Selection Pattern Methods GetCurrentSelection(ptr*) CurrentCanSelectMultiple(long*) CurrentIsSelectionRequired(long*) Parents from Desktop Pane: Desktop Window: Reporting Client - Perceptron - Navigation - [Navigation] Pane: Standard Report Tree Pane: Afx:TabWnd:400000:8:10007:10 Pane: Standard Report Tree Parent to child index
-
FordsFinest reacted to a post in a topic: get LegacyAccessibleName from item in TreeView. UIAutomation
-
That's too cool. Thanks a lot for the help. I actually need to click "LAP_VOW" and eventually an item located within that as well. I created an array of all the handles under "Plant" and click everything just fine, but I'm trying to add some robustness to it by checking the name of the item as well. This way if the list is ever changed i'm not just referencing array[16]. Treeview Element TreeItem: LAP_VOW Element Properties (identification) $UIA_ControlTypePropertyId $UIA_TreeItemControlTypeId $UIA_NamePropertyId LAP_VOW Element Properties (session unique) $UIA_ProcessIdPropertyId 10724 $UIA_RuntimeIdPropertyId 42,2229772,2,164376976 Element Properties (information) $UIA_BoundingRectanglePropertyId l=-1811,t=735,w=57,h=32 $UIA_FrameworkIdPropertyId Win32 $UIA_LocalizedControlTypePropertyId tree item $UIA_ProviderDescriptionPropertyId [pid:10724,hwnd:0x0 Annotation:Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main(parent link):Microsoft: TreeView Item Proxy (unmanaged:uiautomationcore.dll)] Element Properties (has/is info) $UIA_HasKeyboardFocusPropertyId True $UIA_IsContentElementPropertyId True $UIA_IsControlElementPropertyId True $UIA_IsDataValidForFormPropertyId False $UIA_IsEnabledPropertyId True $UIA_IsKeyboardFocusablePropertyId True $UIA_IsOffscreenPropertyId False $UIA_IsPasswordPropertyId False $UIA_IsRequiredForFormPropertyId False Control Patterns (element actions) $UIA_IsExpandCollapsePatternAvailablePropertyId True $UIA_IsLegacyIAccessiblePatternAvailablePropertyId True $UIA_IsScrollItemPatternAvailablePropertyId True $UIA_IsSelectionItemPatternAvailablePropertyId True Control Pattern Properties $UIA_ExpandCollapseExpandCollapseStatePropertyId $ExpandCollapseState_Collapsed $UIA_LegacyIAccessibleChildIdPropertyId 0 $UIA_LegacyIAccessibleDefaultActionPropertyId Expand $UIA_LegacyIAccessibleDescriptionPropertyId $UIA_LegacyIAccessibleHelpPropertyId $UIA_LegacyIAccessibleKeyboardShortcutPropertyId $UIA_LegacyIAccessibleNamePropertyId LAP_VOW $UIA_LegacyIAccessibleRolePropertyId 36 = $ROLE_SYSTEM_OUTLINEITEM $UIA_LegacyIAccessibleStatePropertyId 3146758 = $STATE_SYSTEM_SELECTED+$STATE_SYSTEM_FOCUSED+$STATE_SYSTEM_COLLAPSED+$STATE_SYSTEM_FOCUSABLE+$STATE_SYSTEM_SELECTABLE $UIA_LegacyIAccessibleValuePropertyId $UIA_SelectionItemIsSelectedPropertyId True $UIA_SelectionItemSelectionContainerPropertyId Control Pattern Methods ExpandCollapse Pattern Methods Expand() Collapse() CurrentExpandCollapseState(long*) LegacyIAccessible Pattern Methods DoDefaultAction() Select(long) SetValue(wstr) GetIAccessible(idispatch*) CurrentChildId(int*) CurrentDefaultAction(bstr*) CurrentDescription(bstr*) CurrentHelp(bstr*) CurrentKeyboardShortcut(bstr*) CurrentName(bstr*) CurrentRole(uint*) CurrentState(uint*) CurrentValue(bstr*) GetCurrentSelection(ptr*) ScrollItem Pattern Methods ScrollIntoView() SelectionItem Pattern Methods Select() AddToSelection() RemoveFromSelection() CurrentIsSelected(long*) CurrentSelectionContainer(ptr*) Parents from Desktop Pane: Desktop Window: Reporting Client - Perceptron - Navigation Pane: Standard Report Tree Pane: Afx:TabWnd:400000:8:10007:10 Pane: Standard Report Tree Tree: SysTreeView32 TreeItem: Plant Parent to child index
-
First time posting here, so i'm sure I am going to violate some sort of rule...But I am totally new to UIAutomation and am having a heck of time completing a simple task. I need to verify the name of an item in a SysTreeView32 is a certain string. I've spent days trying every GUI_CtrlTreeView command out there with no success. I downloaded this Inspect.exe tool that was helpful in showing me there was no text for the item. The string i'm looking for WAS located under Name and Legacy Accessible Name however, but I am not sure how to check that property for a selected item. Any help would be much appreciated!! Here is a snapshot of the Window Info and the tree I am trying to access. lastly, here is the Inspect Info.