pyautogui Notes

获取位置 position()

屏幕尺寸 size()

给定位置是否在屏幕内 onScreen(x, y)

初始配置

调用延时 pyautogui.PAUSE = 2.5

  • 设置调用延时

    • 每一次调用 pyautogui 之后, 会被延时多久

中止方式 pyautogui.FAILSAFE = True

  • 鼠标移动到左上角,中止执行

移动操作

绝对移动 moveTo(x, y, duration=num_seconds)

  • 即,相对于原点(左上角)的位置
  • 参数

pywin32 Notes

Tutorials and Documentations

https://stackoverflow.com/questions/5481686/why-cant-i-find-any-pywin32-documentation-resources

http://docs.activestate.com/activepython/2.6/pywin32/PyWin32.HTML

https://pbpython.com/windows-com.html

Meghanada Notes

不能使用

  • 可能是因为 emacs 以前的缓存造成的拖累

    • 解决方法

      1. 删除 .emacs.d/workspace 文件夹
      2. 重启
  • 调试方法

    • shell 启动

      1
      
        java -jar ~/.emacs.d/meghanada/meghanada-1.3.1.jar

argparse

argparse 模块, 辅助模块 shlex

辅助模块 shlex

eg: shlex.split('lpp –species-list Na NaH')

弹出错误提示

  • 使用 parser.error("Your message.")

https://stackoverflow.com/questions/6722936/python-argparse-make-at-least-one-argument-required

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import argparse

parser = argparse.ArgumentParser()
parser.add_argument('-process')
parser.add_argument('-upload')

args = parser.parse_args()

if not (args.process or args.upload):
parser.error('No action requested, add -process or -upload')

Action 类

查看原码