From be9b02c5888b3a94225c2fbfe2f1f29d8d6ca867 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sun, 6 Feb 2022 00:46:41 -0800 Subject: [PATCH] Update README.md and remove unused code --- README.md | 21 +++++++++++++-------- examples/mouse/main.go | 4 ++-- screen/goScreen.h | 7 ------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index da5c027..4998b17 100644 --- a/README.md +++ b/README.md @@ -74,15 +74,18 @@ Or the other GCC (But you should compile the "libpng" with yourself when use the ``` GCC +X11 with the XTest extension (and the Xtst library) + + +"Bitmap": + libpng (Just used by bitmap) -X11 with the XTest extension (also known as the Xtst library) - -Event: +"Event": xcb, xkb, libxkbcommon -Clipboard: +"Clipboard": xsel xclip ``` @@ -172,7 +175,7 @@ func main() { robotgo.Move(10, 20) robotgo.MoveRelative(0, -10) - robotgo.Drag(10, 10) + robotgo.DragSmooth(10, 10) robotgo.Click("wheelRight") robotgo.Click("left", true) @@ -208,9 +211,9 @@ func main() { robotgo.KeySleep = 100 robotgo.KeyTap("enter") // robotgo.TypeStr("en") - robotgo.KeyTap("i", "alt", "command") + robotgo.KeyTap("i", "alt", "cmd") - arr := []string{"alt", "command"} + arr := []string{"alt", "cmd"} robotgo.KeyTap("i", arr) robotgo.MilliSleep(100) @@ -507,7 +510,9 @@ Some discussions and questions, please see [issues/228](https://github.com/go-vg * [Contributors](https://github.com/go-vgo/robotgo/graphs/contributors) ## Plans -- Update Find an image on screen, read pixels from an image +- Refactor some C code to Go (such as x11, windows) +- Better multiscreen support +- Waylad supports - Update Window Handle - Try support Android, maybe support IOS diff --git a/examples/mouse/main.go b/examples/mouse/main.go index 3f69a9d..c03e849 100644 --- a/examples/mouse/main.go +++ b/examples/mouse/main.go @@ -25,8 +25,8 @@ func move() { // move the mouse to 100, 200 robotgo.Move(100, 200) - robotgo.Drag(10, 10) - robotgo.Drag(20, 20, "right") + // robotgo.Drag(10, 10) + // robotgo.Drag(20, 20, "right") // robotgo.DragSmooth(10, 10) robotgo.DragSmooth(100, 200, 1.0, 100.0) diff --git a/screen/goScreen.h b/screen/goScreen.h index fb9048d..77934e6 100644 --- a/screen/goScreen.h +++ b/screen/goScreen.h @@ -58,13 +58,6 @@ MMRGBHex get_px_color(int32_t x, int32_t y, int32_t display_id) { return color; } -char* get_pixel_color(int32_t x, int32_t y, int32_t display_id) { - MMRGBHex color = get_px_color(x, y, display_id); - - char* s = pad_hex(color); - return s; -} - char* set_XDisplay_name(char* name) { #if defined(USE_X11) setXDisplay(name);