Giter Site home page Giter Site logo

zj360202 / robotgo_mouse Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 51 KB

robotgo_mouse只包含鼠标模拟操作的robotgo简化版,以下是我个人理解与测试,错误的地方请原谅;keyboard感觉好像少几个按键( "-", "=", "[", "]", "\", ";", "'", ",", ".", "/");截屏功能时间开销又太大;(测试截屏到保存一张png开销在500ms)所以就单独提取了mouse一块的功能

License: Apache License 2.0

C 33.70% Objective-C 28.80% Go 37.50%
robotgo mouse go golang linux windows mac macos

robotgo_mouse's Introduction

robotgo_mouse

robotgo_mouse只包含鼠标模拟操作的robotgo简化版(没有任何新功能开发,完全属于robotgo的子集合)

以下是我个人理解与测试,错误的地方请原谅与告知:

  1. keyboard感觉好像少几个按键( "-", "=", "[", "]", "", ";", "'", ",", ".", "/");
  2. 截屏功能时间开销又太大;(测试截屏到保存一张png开销在500ms)

所以就单独提取了mouse一块的功能

从完整引用robotgo项目生产exe 10MB到现在3.5MB

package main

import (
	"fmt"
	//"robotgo_mouse"
	"github.com/zj360202/robotgo_mouse"
)

func main() {
	fmt.Println("main go")
	////////////////////////////////////////////////////////////
	// 初始化新增接口,不能少,不然部分包含smooth的接口与MoveClick接口无法使用
	//w, h通过其他项目获取  比如:github.com/kbinani/screenshot
	robotgo_mouse.InitScreenSize(1920, 1080)
	////////////////////////////////////////////////////////////

	// 开始使用其他接口
	robotgo_mouse.MoveMouse(200, 200)
	x, y := robotgo_mouse.GetMousePos()
	fmt.Println(x, y)
}

引用

robotgo 原项目

License

Robotgo is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, LICENSE-MIT.

robotgo_mouse's People

Contributors

zj360202 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

robotgo_mouse's Issues

可不可以帮我也整一个

package main

import (
	"github.com/go-vgo/robotgo"
)

func main() {
	robotgo.TypeStr("cd 桌面")
}

我在写一个终端的输入法(toy),整个项目看下来只需要用到这一句...
有没有其他功能类似的项目推荐或者能不能按照这个函数精简一下qaq
磕头了(_ _)。出来之后一定一键三连

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.