AutoPage Command (APL 2023.1 to 2023.2)
Automatically progress through a series of pages displayed in a Pager component. The
AutoPage command finishes after the last page has been displayed for the requested amount of time.
AutoPage command has the properties shown in the following table, in addition to the common command properties. Set the
type property to
In the following table, the "Default" column shows "Required" for properties that must have a value for the command to run. Otherwise it displays the default value, which might be none.
All pages in the pager
The number of pages to display.
The amount of time in milliseconds to wait after advancing to the next page.
For example, to auto page through a
This example does the following:
- Pauses for 500 milliseconds for the
- Advances to the next page and pauses for 1000 milliseconds for the
- Continues to advance and pause until the final pause has completed.
For example, assume
mySportsPager has three pages and initially displays page 1.
AutoPage does the following:
- Displays the first page for 500 ms for the delay.
- Changes to the second page and pauses for 1000 ms.
- Changes to the third and pauses for 1000 ms.
At this point the command is complete. Therefore, the
Pager continues to display page three until another command or event causes a change.
AutoPage command has no effect if the
count is non-positive.
AutoPage command does the following when it stops:
- Moves the display ahead to the target page if the
AutoPagecommand sequence is at least 50 percent complete.
- Returns the display to the previous page if it isn't at least 50 percent complete.
onPageChanged command runs one time with the new page if the page has changed
AutoPage command is ignored in fast mode.
A selector that identifies the
Pager component for the command. When not provided, defaults to
:source selector targets the component that issued the
The number of pages to display. If not specified, this defaults to the number of pages remaining. Wrapping isn't supported. The count is internally clipped to fall in the range
[0, pager.children.length - pager.currentIndex - 1].
The amount of time to wait after advancing to the next page. Any animated transition between pages isn't included in the duration and therefore increases the overall command run time.
Because the duration applies after advancing to the next page, it doesn't apply to the first page of the pager. To delay the start of paging, use the standard command
Reinflate command runs, the
AutoPage command can resume after Alexa reinflates the document. The command resumes when it runs on a
sequencer that's specified in the
preservedSequencers array on
If the target component isn't a
Pager in the reinflated hierarchy, the command is ignored.
If a page transition is running when the reinflation occurs, the command continues from the preserved position (if any) or 0 when reinflation completes.
AutoPage from the same page where the command paused, explicitly preserve the
pageIndex with the
The following example shows the
AutoPage command. Click the Start AutoPage button to run the command. The progress bar shows the approximate time remaining based on the number of pages in the pager and the
duration properties in the command. After the
AutoPage completes, the example resets the pager to the first page. The
duration values for this example are set in the data source.
Was this page helpful?
Last updated: frontmatter-missing