BUTTON

This tutorial is specific to our newest product, Hudl Sportscode. If you’re on Sportscode v11, use these resources instead or upgrade today.

This script will grab the output from another button, using an identifier.


FORMAT: BUTTON “button_ identifier” or @“button_identifier"


DEFINITIONS:

  • button_identifier: Letter, number, or both which defines the ID of a button.

Each button must have a unique button identifier.


EXAMPLE 1:

$var = button "id1"
show $var

Obtain the output from the button having the identifier name "id1" and use it in the variable $var. Display it using the SHOW command.

EXAMPLE 2:

$stat1 = @"id1"
$stat2 = @"id2"
$total = $stat1 + $stat2
show $total

Obtain the output from the buttons with identifier names "id1" and "id2". Use these outputs in the variables $stat1 and $stat2. Add these variables to display the total. The values recovered using the @ symbol must be numeric in this script.

EXAMPLE 3:

$var = BUTTON "id1" IN WINDOW "CW1"
show $var

Obtain the output from the button with identifier name "id1" from the code window "CW1" and use it in the variable $var. Display it with the SHOW command. The codification window where the reference button is must be open when the report is run.