Return value for Start Task

Discuss RoboTask here
Post Reply
Developer99
Posts: 6
Joined: Wed Jan 23, 2013 3:01 pm
Location: United States

Return value for Start Task

Post by Developer99 »

What is a good way to return a value from another task started with Start Task?The only way I could see is creating a global variable that I check in the calling task but isn't there a more elegant way?How about like the Run Program dialog and have a decision of what to do if the return value is not zero.Thanks.
Developer99
Posts: 6
Joined: Wed Jan 23, 2013 3:01 pm
Location: United States

Return value for Start Task

Post by Developer99 »

Another question.  Does every task that start get its own thread.  In other words, if two tasks do a Start Task on the same task, will they each get their copy and not crash together in case the local variables were to have differing values?Thanks.
Developer99
Posts: 6
Joined: Wed Jan 23, 2013 3:01 pm
Location: United States

Return value for Start Task

Post by Developer99 »

Hey I also found a need where it would be nice to have a function that would get a TaskID of a task by its name or from dropdown selection.
Oleg
Site Admin
Posts: 3050
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Return value for Start Task

Post by Oleg »

What is a good way to return a value from another task started with Start Task?
You can do this by using global variables
Does every task that start get its own thread. ... and not crash together in case the local variables were to have differing values?
Yes, each task works in separate thread independently of each other. Local variables of the task live only within the task.
...it would be nice to have a function that would get a TaskID of a task by its name ...
If you tell about runtime then look at RoboTaskApp object.
You can use it in Basic script. RoboTaskApp allow you to get information about tasks and control RoboTask from the task.
Basic plugin is additional plugin. Download it here. It is always available on download page.
Post Reply