You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
win10 64bit OS
I installed py3.7.6 64bit and depends on comtypes and typing, run CMD as administrator,when I run automation.py -h,some error occurred:
C:\python37\Scripts>automation.py -h
UIAutomation 2.0.3 (Python 3.7.6, 64 bit)
please wait for 3 seconds
2020-01-06 16:22:28.715 automation.py[75] main -> Starts, Current Cursor Position: (2168, 403)
Traceback (most recent call last):
File "C:\python37\lib\ctypes_init_.py", line 121, in WINFUNCTYPE
return _win_functype_cache[(restype, argtypes, flags)]
KeyError: (<class 'ctypes.HRESULT'>, (<class 'ctypes.c_long'>, <class 'comtypes.automation.tagVARIANT'>, <class 'comtypes.LP_POINTER(IUIAutomationCondition)'>), 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\python37\Scripts\automation.py", line 113, in
main()
File "C:\python37\Scripts\automation.py", line 97, in main
control = auto.GetFocusedControl()
File "C:\python37\lib\site-packages\uiautomation\uiautomation.py", line 7465, in GetFocusedControl
return Control.CreateControlFromElement(_AutomationClient.instance().IUIAutomation.GetFocusedElement())
File "C:\python37\lib\site-packages\uiautomation\uiautomation.py", line 51, in instance
cls._instance = cls()
File "C:\python37\lib\site-packages\uiautomation\uiautomation.py", line 56, in init
self.UIAutomationCore = comtypes.client.GetModule("UIAutomationCore.dll")
File "C:\python37\lib\site-packages\comtypes\client_generate.py", line 110, in GetModule
mod = _CreateWrapper(tlib, pathname)
File "C:\python37\lib\site-packages\comtypes\client_generate.py", line 184, in _CreateWrapper
mod = _my_import(fullname)
File "C:\python37\lib\site-packages\comtypes\client_generate.py", line 24, in my_import
return import(fullname, globals(), locals(), ['DUMMY'])
File "C:\python37\lib\site-packages\comtypes\gen_944DE083_8FB8_45CF_BCB7_C477ACB2F897_0_1_0.py", line 1729, in
( ['out', 'retval'], POINTER(POINTER(IUIAutomationElement)), 'element' )),
File "C:\python37\lib\site-packages\comtypes_init.py", line 329, in setattr
self.make_methods(value)
File "C:\python37\lib\site-packages\comtypes_init.py", line 698, in make_methods
prototype = WINFUNCTYPE(restype, *argtypes)
File "C:\python37\lib\ctypes_init.py", line 123, in WINFUNCTYPE
class WinFunctionType(_CFuncPtr):
TypeError: item 2 in argtypes passes a union by value, which is unsupported.
please help
The text was updated successfully, but these errors were encountered:
win10 64bit OS
I installed py3.7.6 64bit and depends on comtypes and typing, run CMD as administrator,when I run automation.py -h,some error occurred:
C:\python37\Scripts>automation.py -h
UIAutomation 2.0.3 (Python 3.7.6, 64 bit)
please wait for 3 seconds
2020-01-06 16:22:28.715 automation.py[75] main -> Starts, Current Cursor Position: (2168, 403)
Traceback (most recent call last):
File "C:\python37\lib\ctypes_init_.py", line 121, in WINFUNCTYPE
return _win_functype_cache[(restype, argtypes, flags)]
KeyError: (<class 'ctypes.HRESULT'>, (<class 'ctypes.c_long'>, <class 'comtypes.automation.tagVARIANT'>, <class 'comtypes.LP_POINTER(IUIAutomationCondition)'>), 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\python37\Scripts\automation.py", line 113, in
main()
File "C:\python37\Scripts\automation.py", line 97, in main
control = auto.GetFocusedControl()
File "C:\python37\lib\site-packages\uiautomation\uiautomation.py", line 7465, in GetFocusedControl
return Control.CreateControlFromElement(_AutomationClient.instance().IUIAutomation.GetFocusedElement())
File "C:\python37\lib\site-packages\uiautomation\uiautomation.py", line 51, in instance
cls._instance = cls()
File "C:\python37\lib\site-packages\uiautomation\uiautomation.py", line 56, in init
self.UIAutomationCore = comtypes.client.GetModule("UIAutomationCore.dll")
File "C:\python37\lib\site-packages\comtypes\client_generate.py", line 110, in GetModule
mod = _CreateWrapper(tlib, pathname)
File "C:\python37\lib\site-packages\comtypes\client_generate.py", line 184, in _CreateWrapper
mod = _my_import(fullname)
File "C:\python37\lib\site-packages\comtypes\client_generate.py", line 24, in my_import
return import(fullname, globals(), locals(), ['DUMMY'])
File "C:\python37\lib\site-packages\comtypes\gen_944DE083_8FB8_45CF_BCB7_C477ACB2F897_0_1_0.py", line 1729, in
( ['out', 'retval'], POINTER(POINTER(IUIAutomationElement)), 'element' )),
File "C:\python37\lib\site-packages\comtypes_init.py", line 329, in setattr
self.make_methods(value)
File "C:\python37\lib\site-packages\comtypes_init.py", line 698, in make_methods
prototype = WINFUNCTYPE(restype, *argtypes)
File "C:\python37\lib\ctypes_init.py", line 123, in WINFUNCTYPE
class WinFunctionType(_CFuncPtr):
TypeError: item 2 in argtypes passes a union by value, which is unsupported.
please help
The text was updated successfully, but these errors were encountered: