To save the file from the painter click Save on the File menu of the IDE. If you want to create a new BMS macro file click Save As on the File menu of the IDE and specify the new filename.
To save the file and exit from the painter click the close icon on the title bar of the painter and click Yes to save the changes. You cannot specify a new filename if you save the file in this way.