01-05-2020 05:53 AM
Hello!
For example, save variables: var1, var2, var3 by variables pattern: var* to single context key: vars.
event manager applet ctx_save
event none
action 1.0 set var1 1
action 2.0 set var2 2
action 3.0 set var3 3
action 4.0 context save key vars variable "var*"
But, how retrieve?
event manager applet ctx_retrieve
event none
!
! action 1.0 context retrieve key vars variable "var*"
!
! retrieve data, but how access to values?
action 1.0 context retrieve key vars
How to retrieve variables and access to its values using the same pattern?
01-05-2020 01:10 PM
I do believe that is possible, in a programming point of view, what is the var stored? what value does it retrieve from 1 or 2 or 3?
here is some guidelines :
you can call variable when the action required.#
01-06-2020 12:07 AM
Hi there,
This is not a function I have used before, but having read up on it the pattern is:
context save key <key_name> variable <variable_name> context retrieve key <key_name> variable <target_variable_name>
So an example would be:
! action 1.0 set var1 1 action 2.0 set var2 2 action 3.0 set var3 3 action 4.0 context save key k_var1 variable "var1" action 4.1 context save key k_var2 variable "var2" action 4.2 context save key k_var3 variable "var3" action 5.0 retrieve key k_var1 variable "old_var1" action 5.1 retrieve key k_var2 variable "old_var2" action 5.2 retrieve key k_var3 variable "old_var3" action 6.0 syslog msg "Old variables, $old_var1, $old_var2, $old_var3" !
cheers,
Seb.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide