Update README.md

This commit is contained in:
vcaesar 2018-01-19 20:46:25 +08:00
parent 9dcffd344a
commit 0425190a57
2 changed files with 12 additions and 0 deletions

View File

@ -234,8 +234,14 @@ func main() {
fpid, err := robotgo.FindIds("Google")
if err == nil {
fmt.Println("pids...", fpid)
if len(fpid) > 0 {
robotgo.ActivePID(fpid[0])
}
}
robotgo.ActiveName("chrome")
isExist, err := robotgo.PidExists(100)
if err == nil {
fmt.Println("pid exists is", isExist)

View File

@ -232,8 +232,14 @@ func main() {
fpid, err := robotgo.FindIds("Google")
if err == nil {
fmt.Println("pids...", fpid)
if len(fpid) > 0 {
robotgo.ActivePID(fpid[0])
}
}
robotgo.ActiveName("chrome")
isExist, err := robotgo.PidExists(100)
if err == nil {
fmt.Println("pid exists is", isExist)