The script there is just an example of the mechanics / method. Adapt it to your needs, hook it up to the desired input.