I can get a local variable in Basic script with:
RoboTaskApp.ExpandText("{V_VAR_NAME}")
But how can I set a value in local variable?
RoboTaskApp.SetUserVariable("V_VAR_VALUE", "my value")
seams to only work with global variable (user variable) but not with local variable
Basic Script and Local Variable
Basic Script and Local Variable
If you want to use local variable you should declare local variables in task editor. Look at "Local variables" tab of task editor.
Also read more about local variables here.
If you not declare local variable then RoboTask creates and uses global variables instead.
Also read more about local variables here.
If you not declare local variable then RoboTask creates and uses global variables instead.
Last edited by Oleg on Fri Jun 22, 2012 12:48 pm, edited 1 time in total.
Basic Script and Local Variable
I'm ok with local variable. But the problem is to set them in Basic Script.
RoboTaskApp.SetUserVariable seams to not modify value
RoboTaskApp.SetUserVariable seams to not modify value
Basic Script and Local Variable
I've just tested it in small example. Expression RoboTaskApp.SetUserVariable sets value to local variable correctly.
I can send the example to you if it's necessary.
I can send the example to you if it's necessary.
Basic Script and Local Variable
Ok It works fine.
I've began with a complex test script and I've made a mistake.
I've began with a complex test script and I've made a mistake.