robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

MaxWindow & MinWindow actions take no effect

Open henson opened this issue 6 years ago • 5 comments

  • Robotgo version (or commit ref): v0.90.0.940, Sierra Nevada!
  • Go version: go1.12.5 windows/amd64
  • Gcc version: gcc version 5.1.0 (tdm64-1)
  • Operating system and bit: windows7 64bit
  • Resolution: 1920*1200
  • Can you reproduce the bug at Examples:
    • [x] Yes (provide example code)
    • [ ] No
    • [ ] Not relevant
  • Provide example code:
func findIds() {
	// find the process id by the process name
	fpid, err := robotgo.FindIds("iexplore")
	if err == nil {
		fmt.Println("pids...", fpid)
		if len(fpid) > 0 {
			robotgo.ActivePID(fpid[0])

			tl := robotgo.GetTitle(fpid[0])
			fmt.Println("pid[0] title is: ", tl)

			x, y, w, h := robotgo.GetBounds(fpid[0])
			fmt.Println("GetBounds is: ", x, y, w, h)

			// Windows
			// hwnd := robotgo.FindWindow("google")
			// hwnd := robotgo.GetHWND()
			robotgo.MinWindow(fpid[0])
			robotgo.MilliSleep(3 * 1000)

			robotgo.MaxWindow(fpid[0])
			robotgo.CloseWindow(fpid[0])

			//robotgo.Kill(fpid[0])
		}
	}
}
  • Log gist: pids... [26456 28960] pid[0] title is: GetBounds is: 0 0 0 0

Description

MaxWindow & MinWindow actions take no effect ...

henson avatar Feb 21 '20 10:02 henson

Same problem here.

DarkFighterLuke avatar Jul 29 '20 10:07 DarkFighterLuke

I think that I have the same problem here, when I execute robotgo.ActivePID(fpid[0]) the window starts to "highlight" in the task bar but doesn't open. I'm using Windows 10.

herlon214 avatar Sep 06 '20 08:09 herlon214

Windows 11 Pro 22H2,same problem occurs.

xc70203 avatar Sep 09 '22 01:09 xc70203

Same problem. win 10 x64

rpdg avatar Sep 20 '22 07:09 rpdg

Same problem. Win 10 x64 and win8,1 x64

Tom5521 avatar Nov 02 '23 22:11 Tom5521