Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

captureScreen can't save windows and icon imformations #277

Closed
2 tasks
XeonSid opened this issue Jun 5, 2020 · 3 comments
Closed
2 tasks

captureScreen can't save windows and icon imformations #277

XeonSid opened this issue Jun 5, 2020 · 3 comments
Labels
Milestone

Comments

@XeonSid
Copy link

XeonSid commented Jun 5, 2020

  • Robotgo version (or commit ref):
  • Go version:1.12.5
  • Gcc version: clang 11.0.0
  • Operating system and bit: macos 10.15.3
  • Resolution:
  • Can you reproduce the bug at Examples:
    • Yes (provide example code)
    • No
    • [■] Not relevant
  • Provide example code:
package main

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

func main() {
  w,h:=robotgo.GetScreenSize()
  bitmap:=robotgo.CaptureScreen(0,0,w,h)
  fx,fy :=robotgo.FindBitmap(bitmap)
  fmt.Println(fx, fy)
  robotgo.SaveBitmap(bitmap,"a.png")
}
  • Log gist:

Description

when this program is done, "a.png" shows that then the desktop snapshot lacks window and icon information。
...

@vcaesar vcaesar added this to the v0.100.0 milestone Jun 5, 2020
@vcaesar
Copy link
Member

vcaesar commented Jun 5, 2020

Have you given permission to the Terminal app for Screen Recording and Accessibility under: System Preferences > Security and Privacy > Privacy > Accessibility and Screen Recording (assuming that your are running the example program from the Terminal)?

@XeonSid
Copy link
Author

XeonSid commented Jun 6, 2020

I didn't realize that. I will give a try latter. THX

@vcaesar
Copy link
Member

vcaesar commented Nov 13, 2023

Given permission to the Terminal app for Screen Recording and Accessibility under: System Settings > Privacy and Security > Accessibility, Screen Recording.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants