hi Srdjan,
Quite frankly, I have no idea.
I was hoping to see a sample script of how to do that but so far, there seems to be none. Turning off the legend is the easy part but actually writing the script is the hard part because first of all, I don't even know how to get started.
If you find out a way to do it, please share. I will do the same.
Thanks,