Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Add - method of object PmSequencer

Description:
Adding new item into the queue
Syntax:
Add(Timeout As Variant, Val1 As Variant, [Val2 As Variant], [Val3 As Variant], [Params As String]) As Boolean
Calling:
Into the object we add an item that is released after 10 seconds:
oSequencer.Add 10, "ID1", 1
Parameters:
Timeout(Variant) Defines when the item is released and thus when the onStep event fires (if it doesn't occur sooner by the Release method).
If it is the numeric value (of Integer, Long, Single, etc. type), then it means the number of seconds after which to release the item (0=doesn't wait, -1=wait for infinite time). The meaning of this item depends on setting the Type of item start on the Sequencer page:
If the "0 = items start independently, each according to its timeout" is set, then it is the time from calling the Add method.
If the "1 = items start chronologically, timeout is delay between them" is set, then it is the time since releasing the last item. In such case the defined timeout must be less or equal to 21 days (i.e. 1814400 seconds).

Possible change of the computer time has no influence to the timeout of items, i.e. the number of seconds is observed till the start.

If it is the value of the Date type, then it is the date and time when to release the item. The Date type cannot be set if the "1 = items start chronologically, timeout is delay between them" is set. Possible change of the computer time has no influence to the absolute time of starting the items. The items are started in the set absolute time (according to the new time). For example, the item that had to be started in 14:00:00, is started in 14:00:00 of the new time.
Val1(Variant) 1.value of the item. This value can be set for the next using in the onStep event.
Val2[optional] (Variant) 2.value of the item. Using see Val1
Val3[optional] (Variant) 3.value of the item. Using see Val1
Params[optional] (String) Additional parameters of the created item. Entries with assigned value are separated by a semicolon, for example thread:main;.
"thread:xxx;" - Defining the thread where the onStep event will be called for this item. The setting is relevant only if the PmSequencer object uses the worh thread (see the configurator "Used thread"), is then ignored. Using this option see PmSequencer and How to start selected scripts in another thread.
"thread:work;" (default) - the item will be launched in the work thread
"thread:main;" - the event will be launched in the main thread
Return Values:
true - Item has been added
false - Item hasn't been added. The reason: if the maximum number of items has been exceeded (see MaxSize) or the Timeout parameter is set badly. This is written into the global errors in the INFO system.
See also:
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice