摘要: 概念 需要声明的是,本文涉及到的数字及运算均基于8位bit下的值。 原码 最高位为符号位,0代表正数,1代表负数,非符号位为该数字绝对值的二进制表示。 如: 127的原码为0111 1111 -127的原码为1111 1111 反码 正数的反码与原码一致; 负数的反码是对原码按位取反,只是最高位(符 阅读全文
posted @ 2020-05-08 14:05 Gex 阅读(437) 评论(0) 推荐(0) 编辑
摘要: moveTo(x,y)将鼠标移动到指定的 x、y 坐标。moveRel (xOffset,yOffset)相对于当前位置移动鼠标。dragTo(x,y)按下左键移动鼠标。dragRel (xOffset,yOffset)按下左键,相对于当前位置移动鼠标。click(x,y,button)模拟点击(默 阅读全文
posted @ 2020-04-30 10:42 Gex 阅读(772) 评论(0) 推荐(0) 编辑
摘要: import pynput import time import re import threading class ControlMouseKeyboard(object): mouse = pynput.mouse.Controller() keyboard = pynput.keyboard. 阅读全文
posted @ 2020-04-27 18:15 Gex 阅读(1682) 评论(2) 推荐(1) 编辑
摘要: def listener_mouse(self): self.keyoard_listener = pynput.keyboard.Listener(on_press=self.keyboard_input_press, on_release=self.keyboard_input_release) 阅读全文
posted @ 2020-04-24 16:22 Gex 阅读(1856) 评论(0) 推荐(0) 编辑
摘要: 控制鼠标 from pynput.mouse import Button, Controller mouse = Controller() print('The current pointer position is {0}'.format(mouse.position)) # 设置鼠标坐标 mou 阅读全文
posted @ 2020-04-21 16:19 Gex 阅读(813) 评论(0) 推荐(1) 编辑
摘要: 一、os.system() 只返回对应状态码,且状态码只会有0(成功)、1、2。 此会将结果之间输出,所有在对返回值没有分析时可用 os.system(cmd) 二、os.popen() 返回脚本命令输出的内容 os.popen()可以实现一个“管道”,从这个命令获取的值可以继续被调用。而os.sy 阅读全文
posted @ 2020-04-10 15:25 Gex 阅读(4122) 评论(0) 推荐(0) 编辑
摘要: import win32api #winapi库 import win32con #windows常数定义 win32api.MessageBox(win32con.NULL, "在过去的1分钟内,CPU连续五次超过4%", "cpu提示") 阅读全文
posted @ 2020-04-08 11:23 Gex 阅读(797) 评论(0) 推荐(0) 编辑
摘要: from serial import Serial from types import FunctionType,MethodType #与类和实例无绑定关系的function都属于函数(function); #与类和实例有绑定关系的function都属于方法(method)。 def open_s 阅读全文
posted @ 2020-04-08 11:21 Gex 阅读(395) 评论(0) 推荐(0) 编辑
摘要: class HangUp(object): current_path = os.getcwd() test_path = current_path + r'/log/' log_name = test_path + time.strftime('%Y-%m-%d %H-%M-%S') + ".log 阅读全文
posted @ 2020-04-08 11:05 Gex 阅读(141) 评论(0) 推荐(0) 编辑
摘要: QCalendar类中常用的方法 方法描述 seTDateRange() 设置日期可供选择的范围 setFirstDayWeek() 重新设置星期的第一天,默认是星期天,其参数枚举值如下 Qt.Monday:星期一 Qt.Tudesday:星期二 Qt.Wednesday:星期三 Qt.Thursd 阅读全文
posted @ 2020-04-02 10:32 Gex 阅读(465) 评论(0) 推荐(0) 编辑