mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
update window examples code
This commit is contained in:
parent
aa077ecb78
commit
f11d01eb22
@ -77,6 +77,14 @@ func findIds() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func active() {
|
||||||
|
robotgo.ActivePID(100)
|
||||||
|
// robotgo.Sleep(2)
|
||||||
|
robotgo.ActiveName("code")
|
||||||
|
robotgo.Sleep(1)
|
||||||
|
robotgo.ActiveName("chrome")
|
||||||
|
}
|
||||||
|
|
||||||
func findName() {
|
func findName() {
|
||||||
// find the process name by the process id
|
// find the process name by the process id
|
||||||
name, err := robotgo.FindName(100)
|
name, err := robotgo.FindName(100)
|
||||||
@ -124,15 +132,14 @@ func window() {
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
alert()
|
alert()
|
||||||
|
//
|
||||||
get()
|
get()
|
||||||
|
|
||||||
findIds()
|
findIds()
|
||||||
|
active()
|
||||||
robotgo.ActiveName("chrome")
|
|
||||||
|
|
||||||
findName()
|
findName()
|
||||||
|
//
|
||||||
ps()
|
ps()
|
||||||
|
|
||||||
// close current Window
|
// close current Window
|
||||||
|
Loading…
Reference in New Issue
Block a user