Finding Atlas regions for top X% of sources

That is described in the scripting tutorial, in its first section: Starting a new script.
Give it a try, and let us know if you encounter any issue

https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#Starting_a_new_script