VB Script won't run Changes

Discuss RoboTask here
Post Reply
photofrog
Posts: 12
Joined: Mon Apr 01, 2013 9:49 pm

VB Script won't run Changes

Post by photofrog »

Hi,

Have this VB script task that sets alot of variables. It seems, perhaps after upgrading to the latest version, that when I add a line to set a new variable, it does not recognize it nor set the variable. It still does set all the other variables that have been in the file for a long time.

RoboTaskApp.AddUserVariable "G_IP_MICAPI", "999.999.999.999"
RoboTaskApp.AddUserVariable "G_IP_MICAPIAA", "999.999.999.999"
RoboTaskApp.AddUserVariable "G_HOST_MICAPI", "http://secure.ihammsonline.com/micapi"

First line (MICAPI) has been in there for a long time. The second and third were just added. But running the script, these variables are not set.

Ideas? Thanks.

David
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: VB Script won't run Changes

Post by Oleg »

Maybe you have global variable G_IP_MICAPI
If global variable is already exist then RoboTask assigns new value to it. Otherwise RoboTask sets local variable by default

If you want to set global variables use such expressions:

RoboTaskApp.AddUserVariable "global@G_IP_MICAPI", "999.999.999.999"
RoboTaskApp.AddUserVariable "global@G_IP_MICAPIAA", "999.999.999.999"
RoboTaskApp.AddUserVariable "global@G_HOST_MICAPI", "http://secure.ihammsonline.com/micapi"

read about variable prefixes here: https://robotask.com/help/index.php?pre ... iables.htm
Also read about some rules of usage: https://robotask.com/help/index.php?rul ... iables.htm
Oleg Yershov
photofrog
Posts: 12
Joined: Mon Apr 01, 2013 9:49 pm

Re: VB Script won't run Changes

Post by photofrog »

Looks like that works. Thank you very much.

David
Post Reply