Jump to content

IUIAutomation MS framework automate chrome, FF, IE, ....


junkew
 Share

Recommended Posts

Quick and easy question. Your guys' knowledge of Autoit is far beyond my own. I'm just looking to do something simple. I have an Java Application called HP Service Manager and I need to automate a few things with it. The SimpleSpy tool is getting information from all the different buttons and links, which is something standard Autoit hasn't done. I'm simply trying to send a ControlClick to the button I'm seeing, but can't seem to get the context right. I think once I have that down I'll be able to figure most of the rest on my own. Here's the info I get from the button:

Mouse position is retrieved 1467-590
At least we have an element [General ][]
Having the following values for all properties: 
Title is: <General > Class   := <> controltype:= <UIA_EditControlTypeId> ,<50004> , (0000C354)
*** Parent Information ***
Title is: <Selected notebook tab - General > Class   := <> controltype:= <UIA_HyperlinkControlTypeId> ,<50005> , (0000C355)
*** Detailed properties of the highlighted element ***
UIA_AcceleratorKeyPropertyId :=
UIA_AccessKeyPropertyId :=
UIA_AriaPropertiesPropertyId :=
UIA_AriaRolePropertyId :=
UIA_AutomationIdPropertyId :=
UIA_BoundingRectanglePropertyId :=1458;579;44;21
UIA_ClassNamePropertyId :=
UIA_ClickablePointPropertyId :=
UIA_ControllerForPropertyId :=
UIA_ControlTypePropertyId :=50004
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 :=True
UIA_IsItemContainerPatternAvailablePropertyId :=False
UIA_IsKeyboardFocusablePropertyId :=False
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 :=True
UIA_IsVirtualizedItemPatternAvailablePropertyId :=False
UIA_IsWindowPatternAvailablePropertyId :=False
UIA_ItemStatusPropertyId :=
UIA_ItemTypePropertyId :=
UIA_LabeledByPropertyId :=
UIA_LegacyIAccessibleChildIdPropertyId :=2
UIA_LegacyIAccessibleDefaultActionPropertyId :=Jump
UIA_LegacyIAccessibleDescriptionPropertyId :=
UIA_LegacyIAccessibleHelpPropertyId :=
UIA_LegacyIAccessibleKeyboardShortcutPropertyId :=
UIA_LegacyIAccessibleNamePropertyId :=General 
UIA_LegacyIAccessibleRolePropertyId :=42
UIA_LegacyIAccessibleSelectionPropertyId :=
UIA_LegacyIAccessibleStatePropertyId :=14680128
UIA_LegacyIAccessibleValuePropertyId :=javascript:setSelected(arr_X13,'X14_p');
UIA_LocalizedControlTypePropertyId :=edit
UIA_MultipleViewCurrentViewPropertyId :=0
UIA_MultipleViewSupportedViewsPropertyId :=
UIA_NamePropertyId :=General 
UIA_NativeWindowHandlePropertyId :=0
UIA_OrientationPropertyId :=0
UIA_ProcessIdPropertyId :=92156
UIA_ProviderDescriptionPropertyId :=[pid:92156,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 :=javascript:setSelected(arr_X13,'X14_p');
UIA_WindowCanMaximizePropertyId :=False
UIA_WindowCanMinimizePropertyId :=False
UIA_WindowIsModalPropertyId :=False
UIA_WindowIsTopmostPropertyId :=False
UIA_WindowWindowInteractionStatePropertyId :=0
UIA_WindowWindowVisualStatePropertyId :=0

 

 

 

After all my researching and reading through most of this thread, this is what I've come up with:

#include <GuiEdit.au3> 
#include <EditConstants.au3> 
#include <GUIConstantsEx.au3> 
#include <WindowsConstants.au3> 
#include <WinAPI.au3> 
#include "UIAWrappers.au3" 
#include <Misc.au3> 
#include <Constants.au3> 

#cs ----------------------------------------------------------------------------  

AutoIt Version: 3.3.12.0 

#ce ---------------------------------------------------------------------------- 

#AutoIt3Wrapper_UseX64=Y 

WinActivate("HPSM Overlay v2") 

ControlClick("General", "", "controltype [UIA_HyperlinkControlTypeId]")

So I can obviously get it to activate the window, but it won't click the button. However, Autoit does not error or see a problem with the command. I've also tried putting a x. before it as well (for Autoitx), no dice with that. I realize this is super simple, I apologize, but I have researched. And I am still learning the ins and outs of Autoit. Much appreciated Junkew!

Link to comment
Share on other sites

first post changed with new uiawrappers and better simplespy that generates simplecode including parent hierarchy

edit july 23rd WORK IN PROGRESS, not fully tested, suggestions are welcome

  • Updated uiwrappers (work in progress, not tested with all examples)
    better variable declaration
    added all properties of IUIAutomation to be used in recognition pattern
  • Updated simple spy with source generation and parenthierarchy to make life easier for starters and quick testing of recognizing objects
Link to comment
Share on other sites

Thanks for the reply junkew! This is what I got:

uia_action("name:=General;controltype=...","click")
^ ERROR
>Exit code: 1    Time: 0.5932

 I have #include "UIAWrappers.au3" at the top, so not sure why it's not recognizing.

Edited by mrwizardd
Link to comment
Share on other sites

I am trying to get the URL of the website being shown it both FF and Chrome.

In the example files ex5_chrome.au3 and ex7_firefox.au3 . I have the following set:

;~  _UIA_DumpThemAll($oChromeToolbar,$treescope_children)
$oValueP=_UIA_getpattern($oChromeAddressBar,$UIA_ValuePatternId)

;~  get the value of the addressbar
$myText=""
$oValueP.CurrentValue($myText)
consolewrite("address: " & $myText & @CRLF)
Exit

In FF the console says:

address: Search or enter address

And it chrome it says:

address:

I am not sure what I am doing wrong.

Link to comment
Share on other sites

What is latest simplespy returning on addressbar of chrome

Mouse position is retrieved 310-45
At least we have an element [Address and search bar][]
Having the following values for all properties: 
Title is: <Address and search bar>  Class   := <>   controltype:= <UIA_EditControlTypeId>   ,<50004>    , (0000C354)    
*** Parent Information top down ***
6: Title is: <Desktop>  Class   := <#32769> controltype:= <UIA_PaneControlTypeId>   ,<50033>    , (0000C371)    
"Title:=Desktop;controltype:=UIA_PaneControlTypeId;class:=#32769"   
5: Title is: <Yahoo - Google Chrome>    Class   := <Chrome_WidgetWin_1> controltype:= <UIA_WindowControlTypeId> ,<50032>    , (0000C370)    
"Title:=Yahoo - Google Chrome;controltype:=UIA_WindowControlTypeId;class:=Chrome_WidgetWin_1"   
4: Title is: <Google Chrome>    Class   := <>   controltype:= <UIA_CustomControlTypeId> ,<50025>    , (0000C369)    
"Title:=Google Chrome;controltype:=UIA_CustomControlTypeId;class:=" 
3: Title is: <> Class   := <>   controltype:= <UIA_CustomControlTypeId> ,<50025>    , (0000C369)    
"Title:=;controltype:=UIA_CustomControlTypeId;class:="  
2: Title is: <> Class   := <>   controltype:= <UIA_CustomControlTypeId> ,<50025>    , (0000C369)    
"Title:=;controltype:=UIA_CustomControlTypeId;class:="  
1: Title is: <Google Chrome Toolbar>    Class   := <>   controltype:= <UIA_ToolBarControlTypeId>    ,<50021>    , (0000C365)    
"Title:=Google Chrome Toolbar;controltype:=UIA_ToolBarControlTypeId;class:="    
0: Title is: <Address and search bar>   Class   := <>   controltype:= <UIA_GroupControlTypeId>  ,<50026>    , (0000C36A)    
"Title:=Address and search bar;controltype:=UIA_GroupControlTypeId;class:=" 
*** Standard code ***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

Local $oP5=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=Yahoo - Google Chrome;controltype:=UIA_WindowControlTypeId;class:=Chrome_WidgetWin_1", $treescope_children)   
_UIA_Action($oP5,"setfocus")
Local $oP4=_UIA_getObjectByFindAll($oP5, "Title:=Google Chrome;controltype:=UIA_CustomControlTypeId;class:=", $treescope_children)  
Local $oP3=_UIA_getObjectByFindAll($oP4, "Title:=;controltype:=UIA_CustomControlTypeId;class:=", $treescope_children)   
Local $oP2=_UIA_getObjectByFindAll($oP3, "Title:=;controltype:=UIA_CustomControlTypeId;class:=", $treescope_children)   
Local $oP1=_UIA_getObjectByFindAll($oP2, "Title:=Google Chrome Toolbar;controltype:=UIA_ToolBarControlTypeId;class:=", $treescope_children) 
Local $oP0=_UIA_getObjectByFindAll($oP1, "Title:=Address and search bar;controltype:=UIA_GroupControlTypeId;class:=", $treescope_children)  
;~ First find the object in the parent before you can do something
;~$oUIElement=_UIA_getObjectByFindAll("Addressandsearchbar.mainwindow", "title:=Address and search bar;ControlType:=UIA_EditControlTypeId", $treescope_subtree)
Local $oUIElement=_UIA_getObjectByFindAll($oP0, "title:=Address and search bar;ControlType:=UIA_EditControlTypeId", $treescope_subtree)
_UIA_action($oUIElement,"click")
*** Detailed properties of the highlighted element ***
UIA_title:= <Address and search bar>
UIA_iaccessiblevalue:= <https://www.yahoo.com>
UIA_iaccessiblechildId:= <0>
UIA_BoundingRectangle:= <120;30;1185;25>
UIA_ProcessId:= <7848>
UIA_ControlType:= <50004>
UIA_LocalizedControlType:= <edit>
UIA_Name:= <Address and search bar>
UIA_HasKeyboardFocus:= <True>
UIA_IsKeyboardFocusable:= <True>
UIA_IsEnabled:= <True>
UIA_Culture:= <0>
UIA_IsControlElement:= <True>
UIA_IsContentElement:= <True>
UIA_IsPassword:= <False>
UIA_NativeWindowHandle:= <0>
UIA_IsOffscreen:= <False>
UIA_Orientation:= <0>
UIA_IsRequiredForForm:= <False>
UIA_IsDockPatternAvailable:= <False>
UIA_IsExpandCollapsePatternAvailable:= <False>
UIA_IsGridItemPatternAvailable:= <False>
UIA_IsGridPatternAvailable:= <False>
UIA_IsInvokePatternAvailable:= <False>
UIA_IsMultipleViewPatternAvailable:= <False>
UIA_IsRangeValuePatternAvailable:= <False>
UIA_IsScrollPatternAvailable:= <False>
UIA_IsScrollItemPatternAvailable:= <False>
UIA_IsSelectionItemPatternAvailable:= <False>
UIA_IsSelectionPatternAvailable:= <False>
UIA_IsTablePatternAvailable:= <False>
UIA_IsTableItemPatternAvailable:= <False>
UIA_IsTextPatternAvailable:= <True>
UIA_IsTogglePatternAvailable:= <False>
UIA_IsTransformPatternAvailable:= <False>
UIA_IsValuePatternAvailable:= <True>
UIA_IsWindowPatternAvailable:= <False>
UIA_ValueIsReadOnly:= <False>
UIA_RangeValueValue:= <0>
UIA_RangeValueIsReadOnly:= <True>
UIA_RangeValueMinimum:= <0>
UIA_RangeValueMaximum:= <0>
UIA_RangeValueLargeChange:= <0>
UIA_RangeValueSmallChange:= <0>
UIA_ScrollHorizontalScrollPercent:= <0>
UIA_ScrollHorizontalViewSize:= <100>
UIA_ScrollVerticalScrollPercent:= <0>
UIA_ScrollVerticalViewSize:= <100>
UIA_ScrollHorizontallyScrollable:= <False>
UIA_ScrollVerticallyScrollable:= <False>
UIA_SelectionCanSelectMultiple:= <False>
UIA_SelectionIsSelectionRequired:= <False>
UIA_GridRowCount:= <0>
UIA_GridColumnCount:= <0>
UIA_GridItemRow:= <0>
UIA_GridItemColumn:= <0>
UIA_GridItemRowSpan:= <1>
UIA_GridItemColumnSpan:= <1>
UIA_DockDockPosition:= <5>
UIA_ExpandCollapseExpandCollapseState:= <3>
UIA_MultipleViewCurrentView:= <0>
UIA_WindowCanMaximize:= <False>
UIA_WindowCanMinimize:= <False>
UIA_WindowWindowVisualState:= <0>
UIA_WindowWindowInteractionState:= <0>
UIA_WindowIsModal:= <False>
UIA_WindowIsTopmost:= <False>
UIA_SelectionItemIsSelected:= <False>
UIA_TableRowOrColumnMajor:= <2>
UIA_ToggleToggleState:= <2>
UIA_TransformCanMove:= <False>
UIA_TransformCanResize:= <False>
UIA_TransformCanRotate:= <False>
UIA_IsLegacyIAccessiblePatternAvailable:= <True>
UIA_LegacyIAccessibleChildId:= <0>
UIA_LegacyIAccessibleName:= <Address and search bar>
UIA_LegacyIAccessibleValue:= <https://www.yahoo.com>
UIA_LegacyIAccessibleRole:= <42>
UIA_LegacyIAccessibleState:= <1048580>
UIA_IsDataValidForForm:= <False>
UIA_ProviderDescription:= <[pid:7848,hwnd:0x0 Main(parent link):Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]>
UIA_IsItemContainerPatternAvailable:= <False>
UIA_IsVirtualizedItemPatternAvailable:= <False>
UIA_IsSynchronizedInputPatternAvailable:= <False>
Edited by Herb191
Link to comment
Share on other sites

Please download latest versions from first post. At ... you should put the right controltypeid

 

That's one of the first things I did. I tried variations of the control type ID, too. I may have to go with another automation program for java if I'm having this much trouble just getting a click to work. Do you have any suggestions?

Link to comment
Share on other sites

Do you see the simple spy higligthing the areas of your object instead of the whole window. If you do see the proper area highlighted then it should not be difficult to get it working with this udf. First try with internet explorer as it seems they support best iuiautomation.

Link to comment
Share on other sites

Junkew, thanks for the response and efforts :) Here is the info for the button:

Mouse position is retrieved 1432-513
At least we have an element [General ][]
Having the following values for all properties: 
Title is: <General > Class   := <> controltype:= <UIA_EditControlTypeId> ,<50004> , (0000C354)
*** Parent Information ***
Title is: <Notebook tab - General > Class   := <> controltype:= <UIA_HyperlinkControlTypeId> ,<50005> , (0000C355)
*** Detailed properties of the highlighted element ***
UIA_AcceleratorKeyPropertyId :=
UIA_AccessKeyPropertyId :=
UIA_AriaPropertiesPropertyId :=
UIA_AriaRolePropertyId :=
UIA_AutomationIdPropertyId :=
UIA_BoundingRectanglePropertyId :=1409;504;44;21
UIA_ClassNamePropertyId :=
UIA_ClickablePointPropertyId :=
UIA_ControllerForPropertyId :=
UIA_ControlTypePropertyId :=50004
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 :=True
UIA_IsItemContainerPatternAvailablePropertyId :=False
UIA_IsKeyboardFocusablePropertyId :=False
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 :=True
UIA_IsVirtualizedItemPatternAvailablePropertyId :=False
UIA_IsWindowPatternAvailablePropertyId :=False
UIA_ItemStatusPropertyId :=
UIA_ItemTypePropertyId :=
UIA_LabeledByPropertyId :=
UIA_LegacyIAccessibleChildIdPropertyId :=2
UIA_LegacyIAccessibleDefaultActionPropertyId :=Jump
UIA_LegacyIAccessibleDescriptionPropertyId :=
UIA_LegacyIAccessibleHelpPropertyId :=
UIA_LegacyIAccessibleKeyboardShortcutPropertyId :=
UIA_LegacyIAccessibleNamePropertyId :=General 
UIA_LegacyIAccessibleRolePropertyId :=42
UIA_LegacyIAccessibleSelectionPropertyId :=
UIA_LegacyIAccessibleStatePropertyId :=12582976
UIA_LegacyIAccessibleValuePropertyId :=javascript:setSelected(arr_X13,'X14_p');
UIA_LocalizedControlTypePropertyId :=edit
UIA_MultipleViewCurrentViewPropertyId :=0
UIA_MultipleViewSupportedViewsPropertyId :=
UIA_NamePropertyId :=General 
UIA_NativeWindowHandlePropertyId :=0
UIA_OrientationPropertyId :=0
UIA_ProcessIdPropertyId :=3660
UIA_ProviderDescriptionPropertyId :=[pid:3660,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 :=javascript:setSelected(arr_X13,'X14_p');
UIA_WindowCanMaximizePropertyId :=False
UIA_WindowCanMinimizePropertyId :=False
UIA_WindowIsModalPropertyId :=False
UIA_WindowIsTopmostPropertyId :=False
UIA_WindowWindowInteractionStatePropertyId :=0
UIA_WindowWindowVisualStatePropertyId :=0
 

 

 

And just for reference, this is what it looks like on the Java GUI:

555i76.jpg

Link to comment
Share on other sites

Please use latest simplespy.au3 and uiawrappers posted 2 days ago as attached in first post. As highlighted area is correct it should not be hard to click on. Maybe latest spy gives directly the code you need. Could be that you need to add instane:nn for hidden controls or controls with same name.

Link to comment
Share on other sites

Finally got around to having a try of this but The linked >chrome example fails and it appears...
 
Global $oDesktop, $pDesktop      ;Deprecated
 
Unfortunately I have no Idea how to fix the example since _UIA_getFirstObjectOfElement still expects an object as it's first param.

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

junkew, In several of your recent post you have been writing something about getting "source code directions" from the new version of SimpleSpy.au3. If I look at the code in SimpleSpy.au3, this seems to be based on a file named codeTemplates.txt. I have no such file. Where can I get it?

Link to comment
Share on other sites

thats the work in progress part :sweating:

so not working at the moment

The thought is to make something like an ini file layout like

[uIA_EditControlTypeId]

'Source here, below 2 dummy line examples

_UIA_Action(@@REGEXP@@, "focus")

_UIA_Action(@@REGEXP@@, "focus")

and then do a straight forward search replace for all known @@<property>@@ with the values spy retrieves thru uiautomation

but then when I was thinking out this layout there are many complications and as such I started with just outputting some standard code to straighten out my mind a little more.

edit: anyway attached a preview template (feel free for comments / wishes) but not working in combination with simplespy yet

 

codeTemplates.txt

Edited by junkew
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...