CoderWanFeng / PyOfficeRobot

pip install PyOfficeRobot,微信机器人
https://www.python-office.com/office/robot.html
MIT License
614 stars 117 forks source link

Mac电脑用不了,M1的 #10

Open CcgKaneki opened 2 years ago

CcgKaneki commented 2 years ago

Traceback (most recent call last): File "", line 1, in File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "jiqiren.py", line 6, in from PyOfficeRobot.core.WeChatType import File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, args, kwargs) File "/venv/lib/python3.7/site-packages/PyOfficeRobot/init.py", line 1, in from PyOfficeRobot.api import chat File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, *kwargs) File "/venv/lib/python3.7/site-packages/PyOfficeRobot/api/chat.py", line 1, in from PyOfficeRobot.core.WeChatType import WeChat File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, args, kwargs) File "/venv/lib/python3.7/site-packages/PyOfficeRobot/core/WeChatType.py", line 5, in import uiautomation as uia File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, kwargs) File "/venv/lib/python3.7/site-packages/uiautomation/init.py", line 4, in from .uiautomation import File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, args, kwargs) File "/venv/lib/python3.7/site-packages/uiautomation/uiautomation.py", line 22, in import ctypes.wintypes File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/wintypes.py", line 20, in class VARIANT_BOOL(ctypes._SimpleCData): ValueError: type 'v' not supported

InfernalAzazel commented 2 years ago

我刚刚翻看作者的 code 应该只是支持 windows

Zyx-A commented 1 year ago

简单搂了下代码,看起来像是通过定位的方式,找到窗口,并根据窗口布局规律,然后识别、粘贴内容。 如果要支持其他平台,估计有不少工作量,用Linux的木得人权。