diff --git a/examples/main.go b/examples/main.go index 56b4c6c..891ff98 100644 --- a/examples/main.go +++ b/examples/main.go @@ -234,8 +234,6 @@ func window() { title := robotgo.GetTitle() fmt.Println("title-----", title) - // close current Window - robotgo.CloseWindow() // set Window Active robotgo.SetActive(mdata) @@ -274,6 +272,9 @@ func window() { if err == nil { fmt.Println("process: ", ps) } + + // close current Window + robotgo.CloseWindow() } func main() { diff --git a/examples/window/main.go b/examples/window/main.go index 0f05635..0442efb 100644 --- a/examples/window/main.go +++ b/examples/window/main.go @@ -48,8 +48,6 @@ func main() { title := robotgo.GetTitle() fmt.Println("title-----", title) - // close current Window - robotgo.CloseWindow() // set Window Active robotgo.SetActive(mdata) @@ -88,4 +86,7 @@ func main() { if err == nil { fmt.Println("process: ", ps) } + + // close current Window + robotgo.CloseWindow() }