Functions work in conditions and values: if count($tabs) > 3, set n = round($x, 2). The time, browser and page functions work in Roost Script too, under the names in the last column; for the rest, Roost Script uses JavaScript's own methods (list.length, text.toLowerCase(), Math.round()).
Checksums as hex text, for checking text against a published checksum or noticing when something changed. md5 and sha1 are fine for that, not for secrets. The hash command does the same for piped lines: page --css "#terms" | hash.
Roost Basic
Does
Roost Script
md5()
md5 hash (hex) of some text
md5()
sha1()
sha1 hash (hex)
sha1()
sha256()
sha256 hash (hex)
sha256()
sha512()
sha512 hash (hex)
sha512()
hash()
hash(text, "sha384"): md5, sha1, sha256, sha384 or sha512
These read the tab you're on, so a script can look before it acts: if exists("Accept all"). They see what's on the screen, and only text: they can't change the page.
Roost Basic
Does
Roost Script
has()
whether the page shows some text: has("Sold out")
has()
exists()
whether there’s a button or link with that text: exists("Next page")
exists()
read()
the text of the first thing matching a CSS selector: read("h1")
read()
readall()
the text of everything matching a CSS selector, as a list: readall(".price")
readAll()
value()
what a field on the page holds: value("Email")
value()
Roost Basic
ifhas("Sold out")
notify"Still sold out"elseifexists("Add to cart")
click"Add to cart"endset prices =readall(".price")
print"First price: $(first($prices))"