Skip to main content

ADD LABEL_IN_GROUP

Use this script to add a label and label group to all open code buttons.

FORMAT: ADD LABEL "Group":$label_name with id “label1“


ARGUMENTS:

  • label_​name: The name of the label you wish to add to all the cur­rent­ly select­ed code but­tons.
  • Group: The name of the Label Group you wish to add to all the cur­rent­ly select­ed code but­tons.
  • tracking_​id: Assign a different ID for each label, so that dupli­cates do not get added. Only the first label for each tracking_​id for each code will be added.

EXAMPLE 1:

ADD LABEL "Quarter":$quarter1 WITH ID "label1"

Adds the Group Name "Quarter" and the val­ue stored in the $quarter1 vari­able to the cur­rent code. Adding the label $quarter1 will occur before the code is added to time­line. If the scripts get exe­cut­ed again no labels with the ID ​“label1” will be added to the same code.

EXAMPLE 2:

$quarter1 = "Q1"

$quarter2 = "Q2"

$quarter3 = "Q3"

$quarter4 = "Q4"

if (button #'quarter1' state = 1, ADD LABEL "Quarter":$quarter1 WITH ID "label1")

if (button #'quarter2' state = 1, ADD LABEL "Quarter":$quarter2 WITH ID "label2")

if (button #'quarter3' state = 1, ADD LABEL "Quarter":$quarter3 WITH ID "label3")

if (button #'quarter4' state = 1, ADD LABEL "Quarter":$quarter4 WITH ID "label4")