added res,setres - fix ScreenWait return (raw, not json)
parent
9fcc1cccd7
commit
c80d8b1095
|
@ -168,20 +168,49 @@ func (c *Cli) KBType(t string) (map[string]interface{}, error) {
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cli) ScreenWait(f string, m int) (ret map[string]interface{}, err error) {
|
func (c *Cli) ScreenWait(f string, m int) ([]byte, error) {
|
||||||
ret = make(map[string]interface{})
|
url := fmt.Sprintf("/ipc/wingui/screen/wait?f=%s&m=%d", f, m)
|
||||||
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/screen/wait?f=%s&m=%d", f, m), &ret)
|
|
||||||
return
|
ret, err := c.HttpCli().RawGet(url)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf(err.Error())
|
||||||
|
}
|
||||||
|
fmt.Println(ret)
|
||||||
|
return ret, err
|
||||||
}
|
}
|
||||||
func (c *Cli) ScreenWaitClick(f string, m int) (ret map[string]interface{}, err error) {
|
func (c *Cli) ScreenWaitClick(f string, m int) ([]byte, error) {
|
||||||
ret = make(map[string]interface{})
|
url := fmt.Sprintf("/ipc/wingui/screen/waitclick?f=%s&m=%d", f, m)
|
||||||
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/screen/waitclick?f=%s&m=%d", f, m), &ret)
|
|
||||||
return
|
ret, err := c.HttpCli().RawGet(url)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf(err.Error())
|
||||||
|
}
|
||||||
|
fmt.Println(ret)
|
||||||
|
return ret, err
|
||||||
}
|
}
|
||||||
func (c *Cli) ScreenWaitClickCenter(f string, m int) (ret map[string]interface{}, err error) {
|
func (c *Cli) ScreenWaitClickCenter(f string, m int) ([]byte, error) {
|
||||||
ret = make(map[string]interface{})
|
url := fmt.Sprintf("/ipc/wingui/screen/waitclickcenter?f=%s&m=%d", f, m)
|
||||||
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/screen/waitclickcenter?f=%s&m=%d", f, m), &ret)
|
|
||||||
return
|
ret, err := c.HttpCli().RawGet(url)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf(err.Error())
|
||||||
|
}
|
||||||
|
fmt.Println(ret)
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Cli) ScreenRes() ([]byte, error) {
|
||||||
|
url := fmt.Sprintf("/ipc/wingui/screen/res")
|
||||||
|
|
||||||
|
ret, err := c.HttpCli().RawGet(url)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf(err.Error())
|
||||||
|
}
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
func (c *Cli) ScreenSetRes(x, y, cor int) error {
|
||||||
|
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/screen/setres?x=%d&y=%d&c=%d", x, y, cor), nil)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewCli() *Cli {
|
func NewCli() *Cli {
|
||||||
|
|
Loading…
Reference in New Issue