> For the complete documentation index, see [llms.txt](https://www.robotmon.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.robotmon.app/jiao-ben-jiao-xue/api-documents/javascript-interface.md).

# JavaScript Interface

```
runScript(script)
```

* `script` String

```
runScriptCallback(script, callback)
```

* `script` String
* `callback` String

```
clickIconButton()
```

Click the `app icon button` on floating widget.

```
clickPlayButton()
```

Click the `play button` on floating widget.

```
clickPauseButton()
```

Click the `pause button` on floating widget.

```
clickLogButton()
```

Click the `log button` on floating widget.

```
clickSettingButton()
```

Click the `setting button` on floating widget.

```
clickCloseButton()
```

Click the `close button` on floating widget.

```
setXY(x, y)
```

* `x` Integer
* `y` Integer

Set the position of the floating widget.

```
getX()
```

Returns `Integer` - The x position of the floating widget.

```
getY()
```

Returns `Integer` - The y position of the floating widget.

```
showMenu()
```

Show the menu on floating widget.

```
hideMenu()
```

Hide the menu on floating widget.

```
showPlayButton()
```

Show the `play button` on floating widget.

```
showPauseButton()
```

Show the `pause button` on floating widget.
