robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

window api does not work on Mac

Open wushu037 opened this issue 2 years ago • 0 comments

  • Robotgo version (or commit ref): v0.100.10
  • Go version: 1.18
  • Gcc version:

image

  • Operating system and bit: macos 12.6 x86_64
  • Resolution:
  • Can you reproduce the bug at Examples:
    • [x] Yes (provide example code)
    • [ ] No
    • [ ] Not relevant
  • Provide example code:
func main() {
	pids, err := robotgo.FindIds("STGame")
	if err == nil {
		fmt.Println("pids... ", pids)
	}
	if len(pids) < 0 {
		robotgo.ShowAlert("robot-keys", "未找到腾讯Start窗口", "ok", "cancel")
	}
	pid := pids[0]

	title := robotgo.GetTitle(pid)
	fmt.Println(title)

	// 操作窗口的都不管用

	err = robotgo.ActivePID(pid)
	if err != nil {
		fmt.Println(err)
		return
	}

	robotgo.MinWindow(pid)
}

Description

Got the correct pid for the window, but both ActivePID and MinWindow and the other APIs about the operation are invalid and do not respond

wushu037 avatar Nov 20 '22 13:11 wushu037