You can do like that. This is the simpiest way that I know.
You can adjust layout and save as workspace than copy the layout statement to your mapbasic. Change the constatns with your variable (like window names ). By changing the map scale you can vary the scale of layout.
Title: Getting a value from the layout window in MB