scheduleVariables and scheduleVariablesEx Methods
scheduleVariables
scheduleVariablesscheduleVariables takes these arguments: inputName, queuingMode, queueName, and variables (where queuing mode is one of the following: update, play). Some older data controllers use this function, but since it doesn’t support sending commands to a specific title, it is less useful than scheduleAction and its use is therefore discouraged.
let s = ServiceHandler.scheduler;
let inputName = 'Test: Test Actions';
s.scheduleVariables(inputName, 'play', '', { Message: 'Greetings!' });scheduleVariablesEx method
scheduleVariablesEx methodThis is an advanced command that can be used in place of scheduleAction when the action you want is complicated and/or the provided presets are not enough. See Actions List for all possible actions.
// Called from JavaScript. Update and schedule variables with advanced controls.
ServiceHandler.scheduler?scheduleVariablesEx(action, time, inputName, channelName, queueName, titleId, startSegmentName, endSegmentName, variables);action: Semicolon-separated list of actions to perform in sequence.time: Ccheduler time (retrieve withgetTime()) when animations should play (variables are updated internally immediately).inputName: Limit this action to the named input.channelName: Limit this action to the named channel.queueName: Limit this action to the named queue.titleId: Limit this action to the named title (by id).startSegmentName: Specify the starting segment by name if relevant.endSegmentName: Specify the ending segment by name if relevant.variables: JavaScript map of variable, value pairs; names must match the current definition.
Example:
// This command expects time as the number of seconds since the Captivate program was launched.
// It can be left blank or set to 0 to run the action immediately.
// Remember the variables update immediately. Only the animations honor the delay.
// Therefore, the following function will do the following:
// - immediately update the variables in the preview window
// - wait 2.5 seconds before animating the variables to the program
// - wait another 2.5 seconds and then animate out
let s = ServiceHandler.scheduler;
let inputName = 'Test: Test Actions';
s.getTime((t) => {
s.scheduleVariablesEx('animateIn', t + 2.5, inputName, '', '', '', '', '', { Message: 'Greetings!' });
s.scheduleVariablesEx('animateOut', t + 5, inputName, '', '', '', '', '', {});
});Last updated