Click on a class name to see the description of that particular class:
static obj GetPubVariable(string application, string scope, string name)
To access the value of a variable published by another applicationuse the function GetPubVariable. The name of the application that published the variable, as well as the scope and name of the published variable, must be specified. The function returns a copy object of the published variable, and therefore modifications of the returned variable have no effect on the original variable.
the application the variable we are requesting belongs to
the scope of the variable as a string. Possible values are "application", "session" or "persistent"
the name of the variable
a copy of the published variable
If the user is not sure if the variable exists (or if it has not yet been published) he can wrap the code between error.Resume and error.Suspend calls in order to avoid stop of the script, as in:
if (a = curApp.GetPubVariable("anApp", "session", "aVar"))
If the application doesn't exist the error Err_NoSuchApplication is throwed.
If the application exists but has not such a variable the error Err_VariableNotDefined is throwed.
If the application exists but has never published the variable the error Err_VariableNotPublished is throwed.
curApp.Publish, curApp.Unpublish, error.Resume, error.Suspend
Return to the curApp class