How do export scripts

How would I export python scripts from blender?

Export as in saving file?

Right Mouse Button in text window brings up a useful menu.

That doesn’t work and yes I want to save the text to either a txt or py file. Is there any other method to saving the text in blender.

Which version of blender are we talking about?