为什么安装

  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安装pyHook,解决【TypeError: MouseSwitch() missing 8 required positional arguments: 'msg', 'x', 'y', 'data', 'time', 'hwnd', and 'window_name'】这个错误!的更多相关文章

  1. typeerror: __init__() missing 2 required positional arguments: 'inputs' and 'outputs'

    1 问题描述 使用下边这条命令去检查 TensorFlow Object Detection API是否正确安装: python object_detection\builders\model_bui ...

  2. 解决TypeError: __init__() missing 1 required positional argument: 'on_delete'

    试用Djiango的时候发现执行mange.py makemigrations 和 migrate是会报错,少位置参数on_delete,查了一下是因为指定外键的方式不对,改一下就OK了. 代码如下: ...

  3. Django问题 TypeError: __init__() missing 1 required positional argument: 'on_delete'

    问题:在执行python manage.py makemigrations learning_logs时,系统会报错,提示:TypeError: __init__() missing 1 requir ...

  4. TypeError: save() missing 1 required positional argument: 'self'

    RT,在创建模型对象的时候,提示TypeError: save() missing 1 required positional argument: 'self' 解决办法:在创建模型对象的时候需要加上 ...

  5. 【Selenium+Python Webdriver】报错之:TypeError: user_login() missing 1 required positional argument: 'self'

    先贴一下源码: base.py文件如下: from selenium import webdriver class Page(object): ''' 页面基础类,用于所有页面的继承 ''' rb_u ...

  6. 执行python manage.py makemigrations时报错TypeError: __init__() missing 1 required positional argument: 'on_delete'

    在执行python manage.py makemigrations时报错: TypeError: __init__() missing 1 required positional argument: ...

  7. Django :执行 python manage.py makemigrations 时报错 TypeError: __init__() missing 1 required positional argument: 'on_delete'

    原因 执行命令 python manage.py makemigrations 报错 TypeError: __init__() missing 1 required positional argum ...

  8. Django关联数据库时报错TypeError: __init__() missing 1 required positional argument: 'on_delete'

    sgrade = models.ForeignKey("Grades",) 执行python manage.py makemigrations后出现TypeError: __ini ...

  9. python进行数据库迁移的时候显示(TypeError: __init__() missing 1 required positional argument: 'on_delete')

    进行数据库迁移的时候,显示  TypeError: __init__() missing 1 required positional argument: 'on_delete' 图示: 出现原因: 在 ...

随机推荐

  1. 基于HTML5及WebGL开发的2D3D第一人称漫游进行碰撞检测

    为了实现一个基于HTML5的场景小游戏,我采用了HT for Web来实现,短短200行代码,我就能实现用“第一人称”来操作前进后退上下左右,并且实现了碰撞检测. 先来看下实现的效果:http://h ...

  2. oracle建表权限问题和JSP连接oracle数据库基本操作

    JSP连接oracle数据库相关操作 1.创建表 打开Enterprise Manager Console,为用户添加权限CREATE ANY TABLE和分配一定的表空间USERS限额1024k. ...

  3. JS的基本类型(小知识)

    一:js中的基本类型: 基本类型:boolen, string ,number,null,undefined 引用类型:object,和函数 二.undedifned和null的区别: 1 undef ...

  4. 237. Delete Node in a Linked List(leetcode)

    Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...

  5. 网络地址转换NAT

    1. 网络地址转换:用于专用网内部的主机和因特网上的主机通信.在专用网连接到因特网 的路由器上需要安装NAT软件,装有NAT软件的路由器叫做NAT路由器,它至少要有 一个有效的全球IP地址.所有使用本 ...

  6. Single linked list by cursor

    有了指针实现看似已经足够了,那为什么还要有另外的实现方式呢?原因是诸如BASIC和FORTRAN等许多语言都不支持指针,如果需要链表而又不能使用指针,那么就必须使用另外的实现方法.还有一个原因,是在A ...

  7. 启动关闭zookeeper集群的脚本

    启动hadoop Ha集群是,每次都要手动启动每个zk节点,实在是太麻烦了.于是乎自己写了个脚本startAllZK.sh: 需要启动的节点,先在 NODENAME_ARR 数组中配置好,zkServ ...

  8. idea 创建多模块依赖Maven项目

    本来网上的教程还算多,但是本着自己有的才是自己的原则,还是自己写一份的好,虽然可能自己也不会真的用得着. 1. 创建一个新maven项目 2. 3. 输入groupid和artifactid,后面步骤 ...

  9. 在CentOS 7.3 中安装 NVIDIA GT730 显卡驱动

    主机: Dell OptiPlex 390 MT (i5) 系列: 显卡: 技嘉(GIGABYTE) GV-N730D5-2GI 902MHz/5000MHz 2GB/64bit GDDR5 显卡 ( ...

  10. #1094 : Lost in the City by C solution

    时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi gets lost in the city. He does not know where he is ...