Description This subroutine sets the name, value and comment for a global script variable.
Syntax SetGlobalVar id, varName, varVal, varComment
Parameters id As Long ID number of the global script variable being modified.
varName As String Name of the global script variable being modified.
varVal As Variant Value of the global script variable being modified.
varComment As String Descriptive comment for the global script variable being modified.
Example This example finds the id for the global script variable g_xVal, retrieves its parameters, modifies the parameter values and then sets the values back to the variable.
Dim id As Long Dim varName As String, varVal As Variant, varComment As String
'find and retrieve the parameters from an existing variable id = FindGlobalVar( "g_xVal" ) GetGlobalVar id, varName, varVal, varComment
'modify and set the new variable parameters varComment = "Modified comment string" varVal = 33.25 SetGlobalVar id, varName, varVal, varComment
See Also
|