question

Mehdi K2 avatar image
0 Likes"
Mehdi K2 asked Joerg Vogel answered

example for Send Delay Message

hi,

Is there an applicable exmaple for understanding the senddelayedmessage() command please?

thanx



Choose One
commands
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

senddelayedmessage(Model.find(“Queue1“, 10, current, 1,2,3)

Object Queue1 receives the message in the On Message trigger. The message is delayed by 10 model run time units by default in seconds.

current is the sender. It is a reference to the object of a trigger

1 is message parameter 1, which is passed into the function msgparam(1) as a number value. Values 2 and 3 behave similar.

You should think about to use the flexscript class object method message, because the message parameters 1,2,3 are of datatype Variant there. This means you can send number, arrays and treenode references directly. In a senddelayedmessage command you must convert a treenode or object into a number by tonum(object or thing) and in the On Message trigger back to a treenode or Object by tonode( number value).

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.