mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-30 22:13:54 +00:00
Update clipboard example code
This commit is contained in:
parent
7bbc39e975
commit
d008e6aa25
@ -7,14 +7,19 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
clipboard.WriteAll("日本語")
|
err := clipboard.WriteAll("日本語")
|
||||||
|
if err != nil {
|
||||||
|
log.Println("clipboard write all error: ", err)
|
||||||
|
}
|
||||||
|
|
||||||
text, err := clipboard.ReadAll()
|
text, err := clipboard.ReadAll()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("clipboard read all error: ", err)
|
log.Println("clipboard read all error: ", err)
|
||||||
} else {
|
return
|
||||||
if text != "" {
|
}
|
||||||
log.Println("text is: ", text)
|
|
||||||
// Output: 日本語
|
if text != "" {
|
||||||
}
|
log.Println("text is: ", text)
|
||||||
|
// Output: 日本語
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user