Scripts are files that describe a time (in milliseconds) and a corresponding position (in percent, from 0 to 100) that indicate where the Handy stroker should be at any given time. You can think of a script as being very similar to a subtitle file.
Scripts come in several formats, but most commonly in FunScript and CSV. Internally, the Handy works with CSV files; as such, any FunScript sent to the Handy will be converted to a CSV on the server-side before reaching the Handy.
FunScripts are a JSON-encoded way to describe a time and position for a device like the Handy stroker.
The FunScript excerpt below describes 4 commands for the Handy to perform at certain points in time:
{
"actions":[
{
"at":0,
"pos":0
},
{
"at":250,
"pos":82
},
{
"at":500,
"pos":51
},
{
"at":750,
"pos":9
}
]
}
<aside> 💡 The first line in a script file is reserved for metadata and will be automatically skipped by the Handy.
</aside>
The same commands in the CSV format look as follows:
# First line is reserved for meta data
0,0
250,82
500,51
750,9
It follows the same format as a Funscript, but does not have any movement data. The script only contains information about access and script references for us to handle on the backend. More info about script tokens can be found in the Script APIs page. It only works on devices connected to the Handyfeeling platform.