Call Command

The Call command is used to branch to subroutine pages within the current script. The subroutine may contain any number of pages, but the final page must define a Return command which will resume execution at the next consecutive page following the Call command. The branching commands feature options to make branching conditional. Lightwing branches only if all of the defined conditions are true, otherwise execution continues with the next consecutive page in the current script.

Day Option

Defines a specific day and/or time condition on which a branch will be taken.  This can be a time which reoccurs every day, or a day that reoccurs every week, or a month that reoccurs every year, or a specific calendar date and/or time event that only occurs once. The maximum number of conditions is 8 per page.

Time Condition Examples

        Examples                                              Occurrences

        12:00PM                                                 Every day at Noon.
        Monday                                                  Every Monday at Midnight.
        Tuesday 12:00PM                                 Every Tuesday at Noon.
        Wednesday January 12:00PM             Every Wednesday in January at Noon.
        1/1/2015                                                 First day of 2015 at Midnight
Example of a Page that Calls a Subroutine only on Weekdays

page: FirstPage
     call: WeekdaysPage    day: Monday    day: Tuesday    day: Wednesday    day: Thursday    day: Friday

Before Option

Defines a specific day and/or time condition before which a branch will be taken. This can be a time which reoccurs every day, or a day that reoccurs every week, or a month that reoccurs every year, or a specific calendar date and/or time event that only occurs once. The date and time syntax is the same as shown for the day option above.

After Option

Defines a specific day and/or time condition after which a branch will be taken. This can be a time which reoccurs every day, or a day that reoccurs every week, or a month that reoccurs every year, or a specific calendar date and/or time event that only occurs once. The date and time syntax is the same as shown for the day option above.

Index Option

Defines a variable to select the branch target page for the Call command. A list of page names must be provided followed by the index option. The numeric value of the specified variable will select a page from the list where the first page is indexed by zero.  The maximum number of page names that can be listed is 24. If the value of the variable is greater than the number of page names listed, none of the branch pages are taken. Also, if any other condition options are combined with this option that are false, none of the branch pages are taken.

        Branch Index Variables

        Names         Ranges
  
        Hour               0 to 23
        Day                   0 to 6
        Month             0 to 11
        Count              0 to 23
        Section            0 to 23
        Example of using the Day Variable to Branch based on the Day of the Week

        page: FirstPage
                call: MondaysPage, TuesdaysPage, WednesdaysPage, ThursdaysPage, FridaysPage, SaturdaysPage, SundaysPage    index: Day

Portrait Option

Defines a display orientation condition that must be met for the branch to be taken. This parameter must be either on or off.  The default is off, which means the display must have a landscape orientation for the branch to be taken. Otherwise, on means the display must have a portrait orientation for the branch to be taken.

 

 

<   Box Command                                              Introduction                                          Chain Command   >