Entirely possible to send a whole script to the robot client interfaces for execution. You just need to wrap the whole thing in a function definition, the controller will wait until it receives the “end” of that function then executes.
How are you trying to do it? Is it not working?