RobotGo, Go Native cross-platform GUI automation @vcaesar

Overview

Robotgo

Build Status CircleCI Status Build Status Appveyor Go Report Card GoDoc GitHub release Join the chat at https://gitter.im/go-vgo/robotgo

Golang Desktop Automation. Control the mouse, keyboard, bitmap, read the screen, Window Handle and global event listener.

RobotGo supports Mac, Windows, and Linux(X11).

Chinese Simplified

Contents

Docs

Binding:

Robotn, binding JavaScript and other, support more language.

Requirements:

Now, Please make sure Golang, GCC is installed correctly before installing RobotGo.

ALL:

Golang

GCC

For Mac OS X:

Xcode Command Line Tools

For Windows:

MinGW-w64 (Use recommended) or other GCC

For everything else:

GCC, libpng

X11 with the XTest extension (also known as the Xtst library)

Event:

xcb, xkb, libxkbcommon
Ubuntu:
sudo apt install gcc libc6-dev

sudo apt install libx11-dev xorg-dev libxtst-dev libpng++-dev

sudo apt install xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev
sudo apt install libxkbcommon-dev

sudo apt install xsel xclip

Fedora:

sudo dnf install libxkbcommon-devel libXtst-devel libxkbcommon-x11-devel xorg-x11-xkb-utils-devel

sudo dnf install libpng-devel

sudo dnf install xsel xclip

Installation:

go get github.com/go-vgo/robotgo

It's that easy!

png.h: No such file or directory? Please see issues/47.

Update:

go get -u github.com/go-vgo/robotgo

Note go1.10.x C file compilation cache problem, golang #24355. go mod vendor problem, golang #26366.

Examples:

Mouse

package main

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

func main() {
  robotgo.ScrollMouse(10, "up")
  robotgo.MouseClick("left", true)
  robotgo.MoveMouseSmooth(100, 200, 1.0, 100.0)
}

Keyboard

package main

import (
  "fmt"

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

func main() {
  robotgo.TypeStr("Hello World")
  robotgo.TypeStr("だんしゃり", 1.0)
  // robotgo.TypeString("テストする")

  robotgo.TypeStr("Hi galaxy. こんにちは世界.")
  robotgo.Sleep(1)

  // ustr := uint32(robotgo.CharCodeAt("Test", 0))
  // robotgo.UnicodeType(ustr)

  robotgo.KeyTap("enter")
  // robotgo.TypeString("en")
  robotgo.KeyTap("i", "alt", "command")

  arr := []string{"alt", "command"}
  robotgo.KeyTap("i", arr)

  robotgo.WriteAll("Test")
  text, err := robotgo.ReadAll()
  if err == nil {
    fmt.Println(text)
  }
}

Screen

package main

import (
	"fmt"

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

func main() {
  x, y := robotgo.GetMousePos()
  fmt.Println("pos: ", x, y)

  color := robotgo.GetPixelColor(100, 200)
  fmt.Println("color---- ", color)
}

Bitmap

package main

import (
	"fmt"

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

func main() {
  bitmap := robotgo.CaptureScreen(10, 20, 30, 40)
  // use `defer robotgo.FreeBitmap(bit)` to free the bitmap
  defer robotgo.FreeBitmap(bitmap)

  fmt.Println("...", bitmap)

  fx, fy := robotgo.FindBitmap(bitmap)
  fmt.Println("FindBitmap------ ", fx, fy)

  robotgo.SaveBitmap(bitmap, "test.png")
}

Event

package main

import (
  "fmt"

  "github.com/go-vgo/robotgo"
  hook "github.com/robotn/gohook"
)

func main() {
  add()
  low()
  event()
}

func add() {
  fmt.Println("--- Please press ctrl + shift + q to stop hook ---")
  robotgo.EventHook(hook.KeyDown, []string{"q", "ctrl", "shift"}, func(e hook.Event) {
    fmt.Println("ctrl-shift-q")
    robotgo.EventEnd()
  })

  fmt.Println("--- Please press w---")
  robotgo.EventHook(hook.KeyDown, []string{"w"}, func(e hook.Event) {
    fmt.Println("w")
  })

  s := robotgo.EventStart()
  <-robotgo.EventProcess(s)
}

func low() {
	EvChan := hook.Start()
	defer hook.End()

	for ev := range EvChan {
		fmt.Println("hook: ", ev)
	}
}

func event() {
  ok := robotgo.AddEvents("q", "ctrl", "shift")
  if ok {
    fmt.Println("add events...")
  }

  keve := robotgo.AddEvent("k")
  if keve {
    fmt.Println("you press... ", "k")
  }

  mleft := robotgo.AddEvent("mleft")
  if mleft {
    fmt.Println("you press... ", "mouse left button")
  }
}

Window

package main

import (
	"fmt"

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

func main() {
  fpid, err := robotgo.FindIds("Google")
  if err == nil {
    fmt.Println("pids... ", fpid)

    if len(fpid) > 0 {
      robotgo.ActivePID(fpid[0])

      robotgo.Kill(fpid[0])
    }
  }

  robotgo.ActiveName("chrome")

  isExist, err := robotgo.PidExists(100)
  if err == nil && isExist {
    fmt.Println("pid exists is", isExist)

    robotgo.Kill(100)
  }

  abool := robotgo.ShowAlert("test", "robotgo")
  if abool {
 	  fmt.Println("[email protected]@@ ", "ok")
  }

  title := robotgo.GetTitle()
  fmt.Println("[email protected]@@ ", title)
}

CrossCompiling

Windows64 to win32
SET CGO_ENABLED=1
SET GOARCH=386
go build main.go

Other to windows

GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -x ./
// CC=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\gcc.exe
// CXX=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\g++.exe

Some discussions and questions, please see issues/228, issues/143.

Authors

Plans

  • Update Find an image on screen, read pixels from an image
  • Update Window Handle
  • Try support Android, maybe support IOS

Contributors

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.

Issues
  • ./bitmap/../base/zlib_util_c.h:2:18: fatal error: zlib.h: No such file or directory

    ./bitmap/../base/zlib_util_c.h:2:18: fatal error: zlib.h: No such file or directory

    • Robotgo version (or commit ref): latest
    • Go version: go version go1.9.2 windows/amd64
    • Gcc version: gcc (tdm64-1) 5.1.0
    • Operating system and bit: Win10_x64

    go get github.com/go-vgo/robotgo github.com/go-vgo/robotgo In file included from ./bitmap/../base/str_io_c.h:2:0, from ./bitmap/goBitmap.h:27, from ......\go\src\github.com\go-vgo\robotgo\robotgo.go:45: ./bitmap/../base/zlib_util_c.h:2:18: fatal error: zlib.h: No such file or directory compilation terminated.

    question 
    opened by tr0mb1r 14
  • XkbGetKeyboard failed to locate a valid keyboard!

    XkbGetKeyboard failed to locate a valid keyboard!

    • Robotgo version (or commit ref): Latest from today
    • Go version: 1.10.4
    • Gcc version: 7.2.0
    • Operating system and bit: Ubuntu 17.10
    • Can you reproduce the bug (Check below code):
      • [ ] Yes
    package main
    
    import (
    	"fmt"
    
    	"github.com/go-vgo/robotgo"
    )
    
    func main() {
    	fmt.Println(robotgo.GetTitle())
    }
    
    
    • Log gist: No protocol specified on_library_load [441]: XOpenDisplay failure! load_input_helper [1892]: XkbGetKeyboard failed to locate a valid keyboard! signal: segmentation fault (core dumped)

    Description

    The program doesnt execute and exits with above log mentioned of XkbGetKeyboard failed to locate a valid Keyboard!. ...

    System information

    Dell Vostro 15 (2017 Model) Gnome 3.26.2 64 Bit

    enhancement 
    opened by imtiyazs 13
  • cross-platform Build

    cross-platform Build

    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 ?

    enhancement question 
    opened by khjde1207 12
  • TypeString Bug

    TypeString Bug

    今天新装的系统 ,环境版本都是最新的,主要TypeString存在问题

    1. TypeString(str) str首字母必须大写, 否则无限输出第一个字母
    2. TypeString 不输出中文

    e.g. robotgo.TypeString("hello xxx") // hhhhhhhhhhhhhhhhh endless robotgo.TypeString("E水电费水电费") // output: E without chinese

    enhancement 
    opened by ThereWeGo 12
  • How to read and find an image using embed?

    How to read and find an image using embed?

    • Robotgo version (or commit ref): v0.100.10
    • Go version: go1.17 windows/amd64
    • Gcc version: gcc version 8.1.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project)
    • Operating system and bit: Windows 10 64bit
    • Resolution: 1920x1080

    Description

    How to read and find an image using go:embed?

    I tried following:

    1. As suggested in https://github.com/go-vgo/robotgo/issues/309
    //go:embed image.png
    var image []byte
    
    func main() {
    	img, _, _ := image.Decode(bytes.NewReader(image))
    	bit := robotgo.ImgToBitmap(img)
    	x, y := robotgo.FindBitmap(bit)
    
    	fmt.Println(x, y)
    }
    

    Does not build due to type mismatch:

    cannot use bit (type robotgo.Bitmap) as type robotgo._Ctype_MMBitmapRef in argument to robotgo.FindBitmap


    //go:embed image.png
    var image string
    
    func main() {
    	img := robotgo.BitmapFromStr(image)
    	x, y := robotgo.FindBitmap(img)
    	
    	fmt.Println(x, y)
    }
    

    Builds, but doesn't find given image on the screen (image's content seems to be loaded via embed):

    bitmap is not ready yet! -1 -1


    func main() {
    	bit := robotgo.OpenBitmap("image.png")
    	x, y := robotgo.FindBitmap(bit)
    	
    	fmt.Println(x, y)
    }
    

    This works, but doesn't use embed - just reads the same file from file system:

    1502 12


    1. I also wanted to try v1.0.0-beta4, but I can't find any function that would find given image on the screen. How to do that?
    enhancement question 
    opened by SirRFI 11
  • Error cross-compiling for windows/386 using xgo

    Error cross-compiling for windows/386 using xgo

    Not sure if this is a robotgo issue or an xgo issue but asking here just in case anyone can shine a light on what is going on.

    Please see this xgo issue for info - https://github.com/karalabe/xgo/issues/123

    question 
    opened by jonbretman 11
  • How to add multiple keypress event listener ?

    How to add multiple keypress event listener ?

    I want press k do something, and press s do something.

    I try it like this, but failed.

    package main
    
    import (
    	"fmt"
    
    	"github.com/go-vgo/robotgo"
    )
    
    func main() {
    
    	kCh := make(chan int)
    	go func() {
    		for {
    			fmt.Println("...event k")
    			kCh <- robotgo.AddEvent("k")
    		}
    	}()
    
    	sCh := make(chan int)
    	go func() {
    		for {
    			fmt.Println("...event s")
    			sCh <- robotgo.AddEvent("s")
    		}
    	}()
    
    	for {
    		switch {
    		case <-kCh == 0:
    			fmt.Println("you press...", "k")
    		case <-sCh == 0:
    			fmt.Println("you press...", "s")
    		}
    		fmt.Println("for switch")
    	}
    }
    
    
    enhancement 
    opened by wilon 10
  • event/goEvent.h file not found

    event/goEvent.h file not found

    • Robotgo version (or commit ref): v0.60.0 6f0557305893c33da9ddb8f8aac687653ec074e8
    • Go version: go version go1.11 darwin/amd64
    • Gcc version:
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 9.1.0 (clang-902.0.39.2)
    Target: x86_64-apple-darwin17.7.0
    Thread model: posix
    
    
    • Operating system and bit:
    macOS High Sierra
    10.13.6
    
    • Resolution:
    • Can you reproduce the bug at Examples:
      • [x] Yes (provide example code)
      • [ ] No
      • [ ] Not relevant
    • Provide example code: run the mouse example via
    go run main.go
    
    • Log gist:
    github.com/robotn/gohook
    ../../vendor/github.com/robotn/gohook/hook.go:22:10: fatal error: 'event/goEvent.h' file not found
    #include "event/goEvent.h"
    1 error generated.
    
    
    question 
    opened by simiwe 9
  • Could not install robotgo in MacOS Sierra using Go 1.10.1

    Could not install robotgo in MacOS Sierra using Go 1.10.1

    • Robotgo version (or commit ref):
    • Go version: 1.10.1
    • Gcc version: n/a
    • Operating system and bit: MacOS Sierra (10.12.6)
    • Can you reproduce the bug at Examples:
      • [ ] Yes (provide example code)
      • [ ] No
      • [X ] Not relevant
    • Provide example code: go get -v github.com/go-vgo/robotgo
    • Log gist:
    robotgo$ go get -v github.com/go-vgo/robotgo
    github.com/go-vgo/robotgo
    # github.com/go-vgo/robotgo
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(png.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngread.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngwrite.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngmem.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngget.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngset.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngtrans.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngrtran.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngerror.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngwio.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngrutil.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngwutil.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngwtran.o)) was built for newer OSX version (10.13) than being linked (10.12)
    ld: warning: object file (/Users/aaguilar/.gvm/pkgsets/go1.10.1/global/src/github.com/go-vgo/robotgo/cdeps/mac/libpng.a(pngrio.o)) was built for newer OSX version (10.13) than being linked (10.12)
    Undefined symbols for architecture x86_64:
      "_inflateValidate", referenced from:
          _png_inflate_claim in libpng.a(pngrutil.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    

    Description

    Could not install robotgo go library via go get -v github.com/go-vgo/robotgo and therefore could not run the basic examples.

    enhancement 
    opened by antonioaguilar 9
  • How to find all bitmaps?

    How to find all bitmaps?

    Hey. Thanks for the project. Can you please tell me how you can find all the coordinates of objects on a bitmap? Something similar to:

    bitmap := robotgo.OpenBitmap("images/sample.png")
    target := robotgo.OpenBitmap("images/target.png")
    for _, points := range robotgo.FindAllBitmaps(target, bitmap) {
    	fmt.Println(points)
    }
    
    enhancement 
    opened by DesSolo 8
  • Capturing screen question

    Capturing screen question

    Hello, I am trying to use this awesome library for screencapture, but it returns MMBitmapRef and actually I cannot get how to convert this to byte[] or image types golang supports. How can I do that? Please, help

    enhancement 
    opened by liflovs 8
  • fatal error: zlib.h: No such file or directory

    fatal error: zlib.h: No such file or directory

    1. Please speak English (English only), this is the language everybody of us can speak and write.
    2. Please take a moment to search that an issue doesn't already exist.
    3. Please make sure Golang, GCC is installed correctly before installing RobotGo.
    1. Please give all relevant information below for bug reports, incomplete details will be handled as an invalid report.

    You MUST delete the content above including this line before posting, otherwise your issue will be invalid.

    • Robotgo version (or commit ref):
    • Go version:
    • Gcc version:
    • Operating system and bit:
    • Resolution:
    • Can you reproduce the bug at Examples:
      • [ ] Yes (provide example code)
      • [ ] No
      • [ ] Not relevant
    • Provide example code:
    package main
    
    import (
    	"github.com/go-vgo/robotgo"
    )
    
    func main() {
    	robotgo.MouseSleep = 100
    
    	robotgo.ScrollMouse(10, "up")
    	robotgo.ScrollMouse(20, "right")
    
    	robotgo.Scroll(0, -10)
    	robotgo.Scroll(100, 0)
    
    	robotgo.MilliSleep(100)
    	robotgo.ScrollSmooth(-10, 6)
    	// robotgo.ScrollRelative(10, -100)
    
    	robotgo.Move(10, 20)
    	robotgo.MoveRelative(0, -10)
    	robotgo.DragSmooth(10, 10)
    
    	robotgo.Click("wheelRight")
    	robotgo.Click("left", true)
    	robotgo.MoveSmooth(100, 200, 1.0, 10.0)
    
    	robotgo.Toggle("left")
    	robotgo.Toggle("left", "up")
    }
    
    • Log gist:

    Description

    image

    ...

    opened by qiuapeng921 0
  • when i make   windows server call robotgo progress , TypeStr function  will  invalid

    when i make windows server call robotgo progress , TypeStr function will invalid

    • Robotgo version (or commit ref):
    • Go version:1.18
    • Gcc version:8.1.6
    • Operating system and bit: win11 x64
    • Resolution:
    • Can you reproduce the bug at Examples:
      • [ ] Yes (provide example code)
      • [1] No
      • [ ] Not relevant
    • Provide example code:
    
    //use github.com/chai2010/winsvc or other library,both failed
    //windows server mode  start to open  gorun.exe
    func StartServer() {
    	cmd := exec.Command("./gorun.exe")
    			err := cmd.Start()
    			if err != nil {
    				fmt.Println(err)
    			}
    }
    
    
    //gorun.exe handler httprequest and then call  robotgo.TypeStr(makeString(recv))
    func process(conn net.Conn) { 
    	defer conn.Close()
     
    	for {
    		reader := bufio.NewReader(conn)
    		var buf [1024]byte
    		n, err := reader.Read(buf[:])
    		if err != nil {
    			fmt.Printf("read from conn failed, err:%v\n", err)
    			break
    		}
    
    		recv := string(buf[:n])
    		if recv != "" {
    			robotgo.TypeStr(makeString(recv))
    		}
    		fmt.Printf("receive:%v\n", recv)
     
    		_, err = conn.Write([]byte("ok"))
    		if err != nil {
    			fmt.Printf("write from conn failed, err:%v\n", err)
    			break
    		}
    	}
    }
    
    
    
    

    Description

    1. I use github.com/chai2010/winsvc to make a service,so i can open my gorun.exe (with robotgo)
    2. then the gorun.exe receive http request to get key press string,then call TypeStr function to press the key
    3. when it is in the windows server mode,TypeStr function will valid,but the httprequest works normal
    4. when i use gorun.exe without windows server,it's all right
    5. when i use an exe call gorun.exe ,it works fine
    6. when windows server call then gorun.exe,it's valid
    7. please find the reason ,tks a lot
    opened by qianyaozu 0
  • Random/invalid mouse position when code is started as Windows service

    Random/invalid mouse position when code is started as Windows service

    • Robotgo version (or commit ref): v1.0.0-beta5.3 (problem also exists with v0.100.10)
    • Go version: 1.18
    • Gcc version: gcc version 12.1.0 (x86_64-win32-sjlj-rev3, Built by MinGW-W64 project)
    • Operating system and bit: Windows 11 (build 21H2), 64 bit
    • Resolution: 3 displays, every 2560x1440
    • Can you reproduce the bug at Examples:
      • [ ] Yes (provide example code)
      • [ ] No
      • [x] Not relevant
    • Provide example code:
    func main() {
    	for {
    		x, y := robotgo.GetMousePos()
    		fmt.Printf("Mouse pos: %d; %d\n", x, y)
    		time.Sleep(60 * time.Second)
    	}
    }
    
    • Log:
    Mouse pos: 6400; 0
    Mouse pos: -690802357; 587
    Mouse pos: 1280; 0
    Mouse pos: 0; 0
    Mouse pos: 0; 0
    Mouse pos: 0; 0
    Mouse pos: -690231853; 587
    Mouse pos: -1314403141; 587
    

    Description

    I've created Windows service (using nssm, but it won't influence for output, it's just services manager) which runs above code with redirection of stdout to file (for debugging purposes). I tried allowing service to interact with desktop, but it does not fix the issue. Every iteration of loop from above code gives random/invalid (even negative values) mouse position.

    I also tried build with go build . -ldflags -H=windowsgui as workaround to hide console window (without service then), then outputs are correct, but every time I'm getting mouse position console appears for few milliseconds.

    If this issue is unfixable due to design of Windows' services, how can I totally hide console of app and get mouse position working?

    opened by mikigal 0
  • fatal error: event/goEvent.h: No such file or directory

    fatal error: event/goEvent.h: No such file or directory

    • Robotgo version (or commit ref): v0.100.10
    • Go version: go1.18.3
    • Gcc version: 11.1.0
    • Operating system and bit: Windows 10 64 bit
    • Resolution: 1920x1080
    • Can you reproduce the bug at Examples:
      • [x] Yes (provide example code)
      • [ ] No
      • [ ] Not relevant
    • Provide example code:
    package main
    
    import (
    	"github.com/go-vgo/robotgo"
    )
    
    func main() {
    	robotgo.Click("right")
    }
    
    • Log gist:
    $ go run .
    # github.com/robotn/gohook
    vendor\github.com\robotn\gohook\hook.go:22:10: fatal error: event/goEvent.h: No such file or directory
       22 | #include "event/goEvent.h"
          |          ^~~~~~~~~~~~~~~~~
    compilation terminated.
    

    Description

    After running go mod vendor I get this error. I tried fixing it by using this https://github.com/go-vgo/robotgo/issues/174#issuecomment-686369737 but it didn't work.

    opened by shardyr 1
  • question in scroll function on different systems

    question in scroll function on different systems

    • Robotgo version (or commit ref):
    • Go version:1.18.3
    • Gcc version:8.1.0
    • Operating system and bit:windows10 x86_64 & darwin arm64
    • Resolution:1920 * 1080
    • Can you reproduce the bug at Examples:
      • [x] Yes (provide example code)
      • [ ] No
      • [ ] Not relevant
    • Provide example code:
    • robotgo.ScrollSmooth(-1)
    • robotgo.ScrollSmooth(0,1,100,-1)
    
    
    • Log gist:

    Description

    The first code above leads to very different result on windows and darwin. What does the toy and tox really mean? On darwin,I think it means the number of pixel? What about windows?Moreover, the tox param seems can't work on windows, the code has been shown as the second one above. Is it a bug? Or just my wrong usage of the function? ...

    opened by IsaacDiane 1
Releases(v1.0.0-beta5.3)
Owner
vgo
The Vgo Programming Language, AI; View with C & Golang & Es6
vgo
Build cross platform GUI apps with GO and HTML/JS/CSS (powered by Electron)

Thanks to go-astilectron build cross platform GUI apps with GO and HTML/JS/CSS. It is the official GO bindings of astilectron and is powered by Electr

Quentin Renard 4.5k Aug 3, 2022
Build cross platform GUI apps with GO and HTML/JS/CSS (powered by nwjs)

gowd Build cross platform GUI apps with GO and HTML/JS/CSS (powered by nwjs) How to use this library: Download and install nwjs Install this library g

Danny 370 Aug 4, 2022
Cross-platform GUI for go is never this easy and clean.

gimu Strongly suggest NOT to use this project anymore, the auto-generated cgo wrapper of Nuklear has a random crash issue which is hard to fix (becaus

Allen Dang 66 Jul 12, 2022
Cross platform rapid GUI framework for golang based on Dear ImGui.

giu Cross platform rapid GUI framework for golang based on Dear ImGui and the great golang binding imgui-go. Any contribution (features, widgets, tuto

Allen Dang 1.5k Aug 8, 2022
Cross-Platform GUI Framework for Go

⚠️ I'm currently working on this project as part of my master's thesis at the Berlin University of Applied Sciences and Technology. It is under active

Jannis Rieger 2 Jun 29, 2022
Kita is a declarative, reactive GUI toolkit for build cross platform apps with web technology with single codebase

Kita is a declarative, reactive GUI toolkit for build cross platform apps with web technology with single codebase. Inspired by Flutter, React. S

zhuah 106 Apr 18, 2022
UIKit - A declarative, reactive GUI toolkit for build cross platform apps with web technology with single codebase

UIKit - A declarative, reactive GUI toolkit for build cross platform apps with web technology with single codebase

zhuah 106 Apr 18, 2022
Cross-platform Go/Golang GUI library.

中文 | English GoVCL Cross-platform Golang GUI library, The core binding is liblcl, a common cross-platform GUI library created by Lazarus. GoVCL is a n

不在乎y 1.6k Aug 12, 2022
Platform-native GUI library for Go.

ui: platform-native GUI library for Go This is a library that aims to provide simple GUI software development in Go. It is based on my libui, a simple

Pietro Gagliardi 8.1k Aug 4, 2022
An experimental Go cross platform UI library.

GXUI - A Go cross platform UI library. Notice: Unfortunately due to a shortage of hours in a day, GXUI is no longer maintained. If you're looking for

Google 4.5k Aug 3, 2022
Build cross-platform modern desktop apps in Go + HTML5

Lorca A very small library to build modern HTML5 desktop apps in Go. It uses Chrome browser as a UI layer. Unlike Electron it doesn't bundle Chrome in

Serge Zaitsev 7.4k Aug 12, 2022
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

webview A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Ni

webview 10.3k Aug 6, 2022
Cross-platform Go library to place an icon in the host operating system's taskbar.

trayhost Package trayhost is a cross-platform Go library to place an icon in the host operating system's taskbar. Platform Support macOS - Fully imple

null 227 Aug 4, 2022
Go cross-platform library for displaying dialogs and input boxes

dlgs dlgs is a cross-platform library for displaying dialogs and input boxes. Installation go get -u github.com/gen2brain/dlgs Documentation Document

Milan Nikolic 364 Aug 4, 2022
A cross-platform app-development module for Go.

The cross-platform Go module for building apps (pronounced klo-va-seed). Usecases As a lightweight alternative to Electron Write your frontend and nat

Qlova Limited 95 Aug 3, 2022
pure go, cross-platform, MIT-licensed ui toolkit for developers

duit - developer ui toolkit WARNING: this library is work in progress. backwards incompatible changes will be made. details duit is a pure go (*), cro

Mechiel Lukkien 856 Aug 3, 2022
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

webview A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Ni

webview 10.3k Aug 5, 2022
Go wrapper around the Iup GUI toolset

Iup Go Wrapper iup is a Go wrapper around the Iup GUI toolkit. The project was started on April 27, 2011. Fork https://github.com/grd/iup is a fork of

grd 24 Nov 28, 2020
Go Wrapper for the wxWidgets GUI

This is the source code for wxGo a Go wrapper of the wxWidgets library. The actuall wxWidgets source code is not included and will need to be downloa

Jeroen Dirks 56 Jul 24, 2022