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
|
||||
}
|
||||
|
||||
func (c *Cli) ScreenWait(f string, m int) (ret map[string]interface{}, err error) {
|
||||
ret = make(map[string]interface{})
|
||||
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/screen/wait?f=%s&m=%d", f, m), &ret)
|
||||
return
|
||||
func (c *Cli) ScreenWait(f string, m int) ([]byte, error) {
|
||||
url := fmt.Sprintf("/ipc/wingui/screen/wait?f=%s&m=%d", f, m)
|
||||
|
||||
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) {
|
||||
ret = make(map[string]interface{})
|
||||
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/screen/waitclick?f=%s&m=%d", f, m), &ret)
|
||||
return
|
||||
func (c *Cli) ScreenWaitClick(f string, m int) ([]byte, error) {
|
||||
url := fmt.Sprintf("/ipc/wingui/screen/waitclick?f=%s&m=%d", f, m)
|
||||
|
||||
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) {
|
||||
ret = make(map[string]interface{})
|
||||
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/screen/waitclickcenter?f=%s&m=%d", f, m), &ret)
|
||||
return
|
||||
func (c *Cli) ScreenWaitClickCenter(f string, m int) ([]byte, error) {
|
||||
url := fmt.Sprintf("/ipc/wingui/screen/waitclickcenter?f=%s&m=%d", f, m)
|
||||
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue