Output Commands

ADD LABEL
BUTTON COLOR
BUTTON OPACITY
BUTTON STATE
MOVE BUTTON BACK
MOVE BUTTON FRONT
OUTPUT COLOR
PUSH BUTTON
PUSH BUTTON DOWN
PUSH BUTTON DOWN WITH DELAY
PUSH BUTTON UP
PUSH BUTTON UP WITH DELAY
RENAME
RENAME GROUP
SEND
SEND BUTTON COLOR
SEND TEXT COLOR
TEXT COLOR


ADD LABEL

Adds a label to the cur­rent code. Returns 1 if suc­cess­ful. Returns 0 if no label was added

Format: ADD LABEL [label_​name] WITH ID [tracking_​id]

Arguments: label_​name: The name of the label you wish to add to all the cur­rent­ly select­ed code but­tons tracking_​id: A string rep­re­sent­ing this oper­a­tion so that dupli­cates do not get added. Only the first label for each tracking_​id for each code will be added.

Available: Available for code win­dows Version: 9 and later

Example: 

ADD LABEL $score with id myScore“
Adds the val­ue stored in the $score vari­able to the cur­rent code. Adding the label $score will occur before the code is added to time­line. If the scripts get exe­cut­ed again no labels with the ID myScore” will be added to the same code


BUTTON COLOR

Changes the back­ground col­or of the cur­rent button

Format: BUTTON COLOR ( red_​color , green_​color , blue_​color ) OR BUTTON COLOR ( red_​color , green_​color , blue_​color , alpha_​level) OR BUTTON COLOR button_name

Arguments: col­or: a red, green or blue col­or val­ue 0->100 alpha: col­or alpha with a val­ue 0->100. 100 no trans­paren­cy in the col­or button_​name: a string with the name of a button

Available: Available for code win­dows Version: 9 and lat­er. alpha_​level avail­able in 9.2

Example: 

BUTTON COLOR (100,0,0)
Changes the back­ground col­or of the cur­rent but­ton to red 

BUTTON COLOR leg­end“
Changes the back­ground col­or of the cur­rent but­ton to that from the but­ton named leg­end” in the same window


BUTTON OPACITY

Changes the opac­i­ty of the cur­rent button

Format: BUTTON OPACITY opacity_level

Arguments: opacity_​level: an opac­i­ty val­ue 0->100. 0 will make the but­ton invisible

Available: Available for code win­dows Version: 9 and later

Example: 

BUTTON OPACITY 50
Changes the but­ton to half transparency


BUTTON STATE

Returns 1 if but­ton is down and 0 if but­ton is up, in the code input window.

Format: BUTTON button_​name STATE OR BUTTON button_​name STATE IN WINDOW window_name

Arguments: button_​name: a string with the name of a but­ton in the code input win­dow window_​name: the name of the code input window

Available: Available for all win­dows Version: 9 and later

Example: 

SHOW BUTTON name1” STATE
Shows 0 or 1 depend­ing on if the but­ton is up or down 

IF (BUTTON name1” STATE IN WINDOW window1”, SHOW DOWN”, SHOW UP”)
Show up/​down depend­ing on if the but­ton name1” is up or down in the code input win­dow with title window1”


MOVE BUTTON BACK

Moves the but­ton to the back of the code window

Format: MOVE BUTTON BACK

Arguments:

Available: Available for code win­dows Version: 9.3 and later

Example:

MOVE BUTTON BACK
Moves this but­ton to the back of the code window


MOVE BUTTON FRONT

Moves the but­ton to the front of the code window

Format: MOVE BUTTON FRONT

Arguments:

Available: Available for code win­dows Version: 9.3 and later

Example:

MOVE BUTTON FRONT
Moves this but­ton to the front of the code window


OUTPUT COLOR

Changes the text col­or for the out­put of the button

Format: OUTPUT COLOR ( red_​color , green_​color , blue_color )

Arguments: col­or: a red, green or blue col­or val­ue 0->100

Available: Available for code win­dows Version: 9 and later

Example:

OUTPUT COLOR (100,0,0)
Changes the out­put col­or of the text to red


PUSH BUTTON

Pushes the but­ton up/​down in the code input win­dow. If this is a label but­ton then you only need to use DOWN

Format: PUSH BUTTON button_​name DOWN OR PUSH BUTTON button_​name UP OR PUSH BUTTON button_​name DOWN IN WINDOW window_​name OR PUSH BUTTON button_​name UP IN WINDOW window_name

Arguments: button_​name: a string with the name of a but­ton in the code input win­dow window_​name: the name of the code input window

Available: Available for spread­sheet win­dows Version: 9 and later

Example:

PUSH BUTTON name1” DOWN
Pushes the but­ton name1” down in the front code input window 

PUSH BUTTON name1” UP IN WINDOW window1“
Pushes the but­ton name1” up in the code input win­dow with title window1”


PUSH BUTTON DOWN

Pushes the but­ton down

Format: PUSH BUTTON DOWN

Arguments:

Available: Available for code win­dows Version: 9 and later

Example:

PUSH BUTTON DOWN
Pushes the cur­rent but­ton down


PUSH BUTTON DOWN WITH DELAY

Pushes the but­ton down after a delay

Format: PUSH BUTTON DOWN WITH DELAY delay

Arguments: delay: delay in sec­onds between 0 and 10

Available: Available for code win­dows Version: 9 and later

Example:

PUSH BUTTON DOWN WITH DELAY 0.2
Pushes the cur­rent but­ton down in 0.2 sec­onds time


PUSH BUTTON UP

Pushes the but­ton up

Format: PUSH BUTTON UP

Arguments:

Available: Available for code win­dows Version: 9 and later

Example:

PUSH BUTTON UP
Pushes the cur­rent but­ton up


PUSH BUTTON UP WITH DELAY

Pushes the but­ton up after a delay

Format: PUSH BUTTON UP WITH DELAY delay

Arguments: delay: delay in sec­onds between 0 and 10

Available: Available for code win­dows Version: 9 and later

Example:

PUSH BUTTON UP WITH DELAY 0.2
Pushes the cur­rent but­ton up in 0.2 sec­onds time


RENAME

Renames the cur­rent button

Format: RENAME new_button_name

Arguments: new_​button_​name: a string con­tain­ing the new but­ton name

Available: Available for code win­dows Version: 9 and later

Example:

RENAME new name“
Changes the name of the cur­rent but­ton to new name”


RENAME GROUP

Renames the group name for the cur­rent but­ton. Only valid for but­tons types that have groups i.e. Label buttons

Format: RENAME GROUP new_group_name

Arguments: new_​group_​name: a string con­tain­ing the new but­ton group name

Available: Available for code win­dows Version: 9 and later

Example:

RENAME GROUP new group“
Changes the group name of the cur­rent but­ton to new group”


SEND

Changes the val­ue of the but­ton in the code input win­dow with that but­ton name

Format: SEND val­ue TO BUTTON button_​name OR SEND val­ue TO BUTTON button_​name IN WINDOW window_name

Arguments: val­ue: a string or a num­ber button_​name: a string with the name of a but­ton in the code input win­dow window_​name: the name of the code input window

Available: Available for spread­sheet win­dows Version: 9 and later

Example: 

SEND new_​string” TO BUTTON name1“
Changes the dis­played val­ue of name1” in the front code input win­dow to new_​string”

SEND 37.4 TO BUTTON name1“
Changes the dis­played val­ue of name1” in the front code input win­dow to 37.4

SEND new_​string” TO BUTTON name1” IN WINDOW codeWindow1“
Changes the dis­played val­ue of name1” in the code input win­dow codeWindow1” to new_​string”


SEND BUTTON COLOR

Changes the back­ground col­or of the but­ton in the code input win­dow with that but­ton name

Format: SEND BUTTON COLOR ( red_​color , green_​color , blue_​color ) TO BUTTON button_​name OR SEND BUTTON COLOR ( red_​color , green_​color , blue_​color , alpha_​level ) TO BUTTON button_​name OR SEND BUTTON COLOR ( red_​color , green_​color , blue_​color ) TO BUTTON button_​name IN WINDOW window_​name OR SEND BUTTON COLOR ( red_​color , green_​color , blue_​color , alpha_​level ) TO BUTTON button_​name IN WINDOW window_name

Arguments: col­or: a red, green or blue col­or val­ue 0->100 alpha: col­or alpha with a val­ue 0->100. 100 no trans­paren­cy in the col­or button_​name: a string with the name of a but­ton in the code input win­dow window_​name: the name of the code input window

Available: Available for spread­sheet win­dows Version: 9 and later

Example:

SEND BUTTON COLOR (100,0,0) TO BUTTON name1“
Changes the back­ground col­or of name1” in the front code input win­dow to red

SEND BUTTON COLOR (100,0,0) TO BUTTON name1” IN WINDOW window1“
Changes the back­ground col­or of name1” in the code input win­dow with title window1” to red


SEND TEXT COLOR

Changes the text col­or of the but­ton in the code input win­dow with that but­ton name

Format: SEND TEXT COLOR ( red_​color , green_​color , blue_​color ) TO BUTTON button_​name OR SEND TEXT COLOR ( red_​color , green_​color , blue_​color , alpha_​level ) TO BUTTON button_​name OR SEND TEXT COLOR ( red_​color , green_​color , blue_​color ) TO BUTTON button_​name IN WINDOW window1” OR SEND TEXT COLOR ( red_​color , green_​color , blue_​color , alpha_​level) TO BUTTON button_​name IN WINDOW window1”

Arguments: col­or: a red, green or blue col­or val­ue 0->100 alpha: col­or alpha with a val­ue 0->100. 100 no trans­paren­cy in the col­or button_​name: a string with the name of a but­ton in the code input win­dow window_​name: the name of the code input window

Available: Available for spread­sheet win­dows Version: 9 and lat­er. alpha_​level avail­able 9.3

Example:

SEND TEXT COLOR (100,0,0) TO BUTTON name1“
Changes the text col­or of name1” in the front code input win­dow to red

SEND TEXT COLOR (100,0,0) TO BUTTON name1” IN WINDOW window1“
Changes the text col­or of name1” in the code input win­dow with title window1” to red


TEXT COLOR

Changes the text col­or in the name of the button

Format: TEXT COLOR ( red_​color , green_​color , blue_​color ) OR TEXT COLOR ( red_​color , green_​color , blue_​color , alpha_level )

Arguments: col­or: a red, green or blue col­or val­ue 0->100 alpha: col­or alpha with a val­ue 0->100. 100 no trans­paren­cy in the color

Available: Available for code win­dows Version: 9 and lat­er. alpha_​level avail­able 9.3

Example:

TEXT COLOR (100,0,0)
Changes the text col­or to red