python3.5安装pyHook,解决【TypeError: MouseSwitch() missing 8 required positional arguments: 'msg', 'x', 'y', 'data', 'time', 'hwnd', and 'window_name'】这个错误!
2017-12-04 20:56
801 查看
为什么安装
pyHook包:为Windows中的全局鼠标和键盘事件提供回调。 Python应用程序为用户输入事件注册事件处理程序,例如鼠标左键,鼠标左键,键盘键等先要实时获取系统的鼠标位置或者键盘输入必备之神器!
python2安装
安装及使用见:Python 键盘鼠标监听python3安装
由于官方还不支持python3,已有的python3版本出现【TypeError: MouseSwitch() missing 8 required positional arguments: 'msg', 'x', 'y', 'data', 'time', 'hwnd', and 'window_name'】这个错误,采用下列方法见:使用Python 3.5/3.6监听本机任意窗口中的按键操作
效果
本例是实时获取鼠标坐标相关文章推荐
- [Python3.5]解决安装一些模块时出现“error: Unable to find vcvarsall.bat”的错误
- python错误TypeError: 'module' object is not callable 的解决方法
- python错误TypeError: 'module' object is not callable 的解决方法
- python安装第三方库,报“error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).”错误,解决办法
- 【python3】 django2.0 在生成数据库表时报错: TypeError: __init__() missing 1 required positional argument: 'on_delete'
- Python 3.5 Socket TypeError: a bytes-like object is required, not 'str' 错误提示
- R中安装rgl时“configure: error: missing required library GL”错误的解决方法
- python解决osx安装PIL时的_imagingft.c:73:10: fatal error: 'freetype/fterrors.h' file not found
- 怎么解决python中TypeError: can't pickle instancemethod objects的这个错误
- Python 3.5 Socket TypeError: a bytes-like object is required, not 'str' 错误提示
- 关于windows安装python过程中出现error 2503 2502错误的解决方法
- centos openstack安装 - 解决yum错误Error - requested datatype primary not available
- Eclipse安装WindowBuilder提示错误:An error occurred while collecting items to be installed,解决方法
- gnuplot安装,及error:terminal type set to 'unknown'的解决
- python import 错误 TypeError: 'module' object is not callable
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1
- Python编译时提示“NameError: name 'Popen' is not defined”及”NameError: name 'PIPE' is not defined“错误的解决
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1
- MAC安装python模块碰到“error: command 'cc' failed with exit status 1”解决办法
- 安装python-MySQLdb 出现error: command 'gcc' failed with exit status 1的解决方法