Coder Social home page Coder Social logo

win_imitate's Introduction

Win_Imitate

本库包含两个子项目,其中Imitate是演示项目,ImitateLib是dll项目。

当你需要用代码模拟鼠标和键盘的操作时,添加ImitateLib的引用即可。

ImitateLib

主要包含两个静态类:

  1. Keyboard

    • 模拟键盘的普通输入使用Keyboard.Press(params Keys[] inputs)方法
    • 模拟Ctrl、Alt、Shift组合字母按键时,分别调用相应的Ctrl、Alt、Shift方法
    • 在确保目标控件有输入焦点的情况下,调用Keyboard.InputByClipboard(string data)方法可以将data字符串的内容以从剪切板粘贴的形式输入到控件中
  2. Mouse

    • 模拟鼠标移动到绝对位置:Mouse.MoveTo(x,y)
    • 模拟鼠标移动到相对位置:Mouse.MoveTowards(x,y)
    • 模拟左键、中键、右键的点击:Mouse.LeftClick/MiddleClick/RightClick(int x = 0,int y = 0)
    • 从当前位置开始拖拽鼠标到绝对位置:Mouse.DragTo(x,y)
    • 从当前位置开始拖拽鼠标到相对位置:Mouse.DragTowards(x,y)
    • 模拟鼠标滚轮滚动:Mouse.WheelRoll(int towards)
      • towards>0 为向下滚动,towards的大小为滚动的范围

win_imitate's People

Contributors

js94766524 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.