Skip to content

Otto search bar

Open the Otto search bar and check its position and visibility from a Flow Pro script.

Updated View as Markdown
For humans
Flow APIFlow Pro scriptingWheel and interface

This article covers the following platforms

Use the Command API to open Otto and inspect its on-screen location and visibility.

Open Otto’s search bar, optionally prefilled with a query.

SignatureTypeScript contract
open_search(query?: string): void

Parameters

NameTypeRequiredDescription
querystringNoText with which to prefill the search bar.
ExampleJavaScript
this.$api.command.open_search("weather");

Returns

voidNo direct return value is documented.

get_otto_location()

Get Otto’s on-screen position in pixels.

SignatureTypeScript contract
get_otto_location(): [number, number]
ExampleJavaScript
const [x, y] = this.$api.command.get_otto_location();
console.log({ x, y });

Returns

[number, number]Otto’s x and y position in pixels.

get_otto_state()

Check whether Otto is visible.

SignatureTypeScript contract
get_otto_state(): boolean
ExampleJavaScript
const isVisible = this.$api.command.get_otto_state();
console.log(isVisible);

Returns

booleanWhether Otto is currently visible.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close