From debec4a23736e3259a2a38777d8cdc0cfb03b0a4 Mon Sep 17 00:00:00 2001 From: vCaesar Date: Tue, 4 Jul 2017 20:19:39 +0800 Subject: [PATCH] Update README.md and FindIds --- README.md | 2 +- robotgo.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e3a7669..8c889a3 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ func main() { arr := []string{"alt", "command"} robotgo.KeyTap("i", arr) - robotgo.WriteAll("测试") + robotgo.WriteAll("Test") text, err := robotgo.ReadAll() if err == nil { fmt.Println(text) diff --git a/robotgo.go b/robotgo.go index 2a68335..ab7203f 100644 --- a/robotgo.go +++ b/robotgo.go @@ -974,7 +974,9 @@ func FindIds(name string) ([]int32, error) { } for i := 0; i < len(nps); i++ { - abool := strings.Contains(nps[i].Name, name) + psname := strings.ToLower(nps[i].Name) + name = strings.ToLower(name) + abool := strings.Contains(psname, name) if abool { pids = append(pids, nps[i].Pid) }