mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
21 lines
315 B
Go
21 lines
315 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/go-vgo/robotgo/clipboard"
|
|
)
|
|
|
|
func main() {
|
|
clipboard.WriteAll("日本語")
|
|
text, err := clipboard.ReadAll()
|
|
if err != nil {
|
|
log.Println("clipboard read all error: ", err)
|
|
} else {
|
|
if text != "" {
|
|
log.Println("text is: ", text)
|
|
// Output: 日本語
|
|
}
|
|
}
|
|
}
|