go-vgo / robotgo Goto Github PK
View Code? Open in Web Editor NEWRobotGo, Go Native cross-platform RPA and GUI automation @vcaesar
License: Apache License 2.0
RobotGo, Go Native cross-platform RPA and GUI automation @vcaesar
License: Apache License 2.0
Getting error when pressing k in the Event example.
The packages were different than mentioned for Ubuntu in README.md
Installed missing packages:
$ sudo dnf install libxkbcommon-devel libXtst-devel libxkbcommon-x11-devel xorg-x11-xkb-utils-devel
You can load windows API for all of the work you are doing for windows. This would make it more Pure-Go.
Check out github.com/AllenDang/w32 its a great package with almost everything.
中文文档中部分单词拼写似乎有误,且按照go语言规范语句后没必要加分号
如
robogo.MouseClick();
robot.MouseToggle("down");
似乎应为:
robotgo.MouseClick()
robotgo.MouseToggle("down")
Some active window title is null, such like QQ under MacOS, so we don't know what application it is by GetTitle().
If not, could you add the new API GetActiveWindowProcessId() or GetActiveWindowProcessFilename()?
fmt.Println("capture screen: 10, 20, 30, 40")
bit_map := robotgo.CaptureScreen(10, 20, 30, 40)
fmt.Println("...", bit_map)
fx, fy := robotgo.FindBitmap(bit_map, 0, 0, 100, 100)
fmt.Println("FindBitmap------", fx, fy)
capture screen: 10, 20, 30, 40
... &{0x2f7180 30 40 120 32 4 [2 66 192 0 0 0]}
FindBitmap------ 5584104 4542714
老大,出个联系方式?~
Could TypeString write the string without delay? Just like python module pyautogui pyautogui.typewrite(str)
did
Add Window Handle in future
1.bitmap2
2.fix bug
3.event
`package main
import (
. "fmt"
"github.com/go-vgo/robotgo"
)
func main() {
robotgo.MoveMouse(800, 0)
for i := 0; i < 1080; i += 1000 {
Println(i)
robotgo.MoveMouse(800, i)
}
}
提示错误
.\main.go:14: cannot use i (type int) as type robotgo._Ctype_size_t in argument to robotgo.MoveMouse`
请问.MoveMouse(x, y)的参数为什么不设为int类型?
在循环里面没有办法直接使用int变量给方法传参数?
Support like "Alt+a"
Update AddEvent("mleft") After one hour.
AddEvent func need free mem:
code:
defer C.free(unsafe.Pointer(cs))
Complete bitmap
load_input: Unknown keycode name 'evdev_aliases(qwerty)'!
linux system
今天新装的系统 ,环境版本都是最新的,主要TypeString存在问题
e.g.
robotgo.TypeString("hello xxx") // hhhhhhhhhhhhhhhhh endless robotgo.TypeString("E水电费水电费") // output: E without chinese
1,按键事件监听,如何取消原按键动作,比如代码写上,比如要用A替换K时,当键盘按下K,达到键盘的实际输入是A,原来的K被取消
2,F1, ESC, 小键盘这些如果操作?
as the title,thans
no buildable Go source files in /usr/lib/go-1.6/src/github.com/go-vgo/robotgo
1.Fix bug
2.Bitmap3
3.Window Handle
str := C.aKeyToggle(ckey, cadown, camkey, camkeyt)
I'm trying to hold down keys and when I do so it prints some data on the console.
as I'm already logging things. it just disturbs the log messages.
so my question is it being printed deliberately for some purpose or. can we bypass this printing?
如题
Is there a feature to:
package main
import (
"time"
"github.com/go-vgo/robotgo"
)
func main() {
time.Sleep(1e9)
robotgo.CaptureScreen()
}
这个函数必须转参数!
I was trying to build "go-vgo/robotgo" library .
I have followed each step like downloading "mingw"(32bit) and adding "zlib,pnglib" from zlib&libpng Windows32 GCC's Course as stated. but when i try to get it from cmd using this command,
go get github.com/go-vgo/robotgo
it shows a enormous list of error.
Can anyone help me please. I am using windows 10 (64 bit) and go 1.7.3 (x86).
Errors copied from the cmd is given below,
G:\ProgramFiles\Go32>go get github.com/go-vgo/robotgo
github.com/go-vgo/robotgo In file included from
./mouse/goMouse.h:12:0,
from src\github.com\go-vgo\robotgo\robotgo.go:24: ./mouse/mouse_c.h: In function 'moveMouse': ./mouse/mouse_c.h:116:2:
error: unknown type name 'INPUT' ./mouse/mouse_c.h:117:12: error:
request for member 'type' in something not a structure or union
./mouse/mouse_c.h:117:20: error: 'INPUT_MOUSE' undeclared (first use
in this function) ./mouse/mouse_c.h:117:20: note: each undeclared
...
/System/Library/Frameworks/Foundation.framework/Headers/NSUserScriptTask.h:56:91: error: expected a type
代码如下:
package main
import (
"time"
"github.com/go-vgo/robotgo"
)
func main() {
time.Sleep(5e9)
robotgo.MoveMouse(0, 0)
robotgo.MouseToggle("down")
robotgo.DragMouse(100, 100)
robotgo.MouseToggle("up")
}
I am using Ubuntu.
Cross Compile
/github.com/go-vgo/robotgo$ GOOS=windows GOARCH=386 go build -o test.exe
Error message :
can't load package: package github.com/go-vgo/robotgo: no buildable Go source files in /home/say/golang/gowork/src/github.com/go-vgo/robotgo
Linux Cross Compile, What packages do I need ?
You MUST delete the content above including this line before posting, otherwise your issue will be invalid.
...
Support android.
1.Optimized memory recovery
2.Fix bug
I'm getting this error on circle-ci. on my local machine everything works just fine.
go build -v
github.com/Sirupsen/logrus
github.com/girish946/robotgo
github.com/gorilla/context
github.com/gorilla/mux
# github.com/girish946/robotgo
In file included from event/goEvent.h:25:0,
from /home/ubuntu/.go_workspace/src/github.com/girish946/robotgo/robotgo.go:27:
event/hook/x11/hook_c.h: In function 'hook_event_proc':
event/hook/x11/hook_c.h:357:5: error: 'for' loop initial declarations are only allowed in C99 mode
for (unsigned int i = 0; i < count; i++) {
^
event/hook/x11/hook_c.h:357:5: note: use option -std=c99 or -std=gnu99 to compile your code
go build -v returned exit code 2
Action failed: go build
what should I do for this?
cannot get the handle。。。
这个我要安装哪个库呀,习惯ubuntu下的apt-get install安装。
我用apt-cache search x11-dev和apt-cache search xtest安装一些觉得合适的,但是还是依然提示呀。
1.0以后 总是缺头文件什么的?
Hi there, thanks for great lib.
I wonder if there is any way to handle focus event when entering text field? For example, after "clicking" mouse check whether active window waiting for input...
I'm not familiar with this all things, sorry if question is weird.
I compile libpng (windows 64)
Where i shoud put png.h for correct work?
Now I put png.h in %GOPATH%/src/github.com/go-vgo
But robotgo.FindBitmap
dont work correct? the sample for bitmap work like this:
... &{0x2a9690 30 40 120 32 4 [3 66 192 0 0 0]} FindBitmap------ 1 1
很多时候都需要等待用户热键触发或者关闭键盘或者鼠标动作,有没有可能实现监视全局热键?
Robotgo version (or commit ref): latest
Go version: go1.7.3 darwin/amd64
Gcc version:Apple LLVM version 8.0.0 (clang-800.0.42.1)
Operating system and bit:OS X El Capitan
Provide example code:
same as event demo
https://github.com/go-vgo/robotgo#event
Log gist:
hook_run [1329]: Accessibility API is disabled!
Failed to enable access for assistive devices. (0X40)hook_run [1329]: Accessibility API is disabled!
Failed to enable access for assistive devices. (0X40)
I would like to point out that identifiers like “__IOHOOK_H
” and “_MEvent
” do eventually not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?
Hi
I'm trying to use your lib but i'm getting this error.
cannot use C.int(x) (type C.int) as type robotgo.C.int in argument to robotgo.MoveMouse
What I am doing wrong ?
Thx you :)
package main
import (
. "fmt"
"github.com/go-vgo/robotgo"
)
func main() {
abool := robotgo.ShowAlert("test", "robotgo")
if abool == 0 {
Println("ok@@@", "ok")
}
}
$ go run client.go
XIO: fatal IO error 2 (No such file or directory) on X server ":0.0"
after 11 requests (11 known processed) with 0 events remaining.
os:Archlinux
gcc: 6.2.1 20160830
github.com/go-vgo/robotgo
In file included from ./bitmap/../base/io_init.h:4:0,
from ./bitmap/goBitmap.h:15,
from ..\github.com\go-vgo\robotgo\robotgo.go:16:
./bitmap/../base/png_io_init.h:4:17: fatal error: png.h: No such file or directory
compilation terminated.
错误: 进程退出代码 2.
1.Fix bug
2.Bitmap3
3.Window-Handle2
4.Update Mosue
I think the current repository title could be a little better: maybe removing Golang with Go
RobotGo,Golang Native cross-platform system automation
RobotGo. Go Native cross-platform system automation
Golang is a little bit disliked. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.