This adjustResourceVals function modifies the values and state of a resource.
For more information about Resources, see the Content Designer Guide.
Syntax
bSuccess = adjustResourceVals(resPath,resName,freeAmount,total,lock,unlock,reset)
Arguments
Specifies the path of the resources object.
Specifies the name of the resource in the resources object which must be adjusted.
Specifies the amount of free resources.
The value given in this argument adds up to the existing number of total resources.
Specifies True if the resource must be locked. When Lock is set to true, the values freeAmount and total for that resource cannot be set, and the system function returns false.
Specifies True if the resource must be unlocked.
Note: You cannot lock and unlock the same resource. Switch between lock and unlock when using this system function.
Specifies True if the resources object must be reset.
Note: Specifying true takes precedence over all the other operators. All the parameters of the respective resource are reset to the default values (regardless of the given inputs in the system function).
Return Value
This function returns true if successful or false if it fails.
Example
bSuccess = adjustResourceVals("\Resources","LockResource",20,20,false,true,false);
In this example, the variables are set as follows:
respath = "\Resources" renName = "LockResource" freeAmount = 20; total = 20 lock = false unlock = true reset = false
|
Copyright © 2014 CA.
All rights reserved.
|
|