Update examples

This commit is contained in:
vCaesar 2017-07-01 23:07:30 +08:00
parent add045bd57
commit 1a19c22489
2 changed files with 60 additions and 0 deletions

View File

@ -189,4 +189,34 @@ func main() {
robotgo.CloseWindow() // close current Window
robotgo.SetActive(mdata) // set Window Active
fpid, err := robotgo.FindIds("Google")
if err == nil {
fmt.Println("pids...", fpid)
}
isExist, err := robotgo.PidExists(100)
if err == nil {
fmt.Println("pid exists is", isExist)
}
pids, err := robotgo.Pids()
if err == nil {
fmt.Println("pids: ", pids)
}
name, err := robotgo.FindName(100)
if err == nil {
fmt.Println("name: ", name)
}
names, err := robotgo.FindNames()
if err == nil {
fmt.Println("name: ", names)
}
ps, err := robotgo.Process()
if err == nil {
fmt.Println("process: ", ps)
}
}

View File

@ -43,4 +43,34 @@ func main() {
robotgo.CloseWindow() // close current Window
robotgo.SetActive(mdata) // set Window Active
fpid, err := robotgo.FindIds("Google")
if err == nil {
fmt.Println("pids...", fpid)
}
isExist, err := robotgo.PidExists(100)
if err == nil {
fmt.Println("pid exists is", isExist)
}
pids, err := robotgo.Pids()
if err == nil {
fmt.Println("pids: ", pids)
}
name, err := robotgo.FindName(100)
if err == nil {
fmt.Println("name: ", name)
}
names, err := robotgo.FindNames()
if err == nil {
fmt.Println("name: ", names)
}
ps, err := robotgo.Process()
if err == nil {
fmt.Println("process: ", ps)
}
}