callbot(__filepath, __argument);


With the built-in callbot function it is possible to (conditionally) run another robot, using Xill. A parameter can be passed along, which can be any variable, including a list or an object. That variable can be named in the called robot using the argument keyword instead of the usual word var. This is similar to running a robot in command line using Xill headless, which is not finished yet at the time of writing of this article.

See also: include


Say, this is the robot named "PrintString.xill":

use System;

argument message = "This is the default message. Set the argument parameter to print another message.";

...then this line, in another robot in the same directory:

callbot("PrintString.xill","Hello World");

...will output "Hello World".

A relative path is used here. Alternatively you can specify a complete path, but this is not recommended, since all robots used in a project should usually have the same root path and this root path might change.