Can I save a *New* map from a script?

I'm creating a custom template to help me map the decks of the habitat ring of a large rotating space station. (13 decks averaging about a mile long with widths varying from 72 to 114 feet for a total area of 155 acres. Since each map will cover a 30° arc of one deck, that's a 156 maps! ?) The initial map looks like this:

After I entered the data, the script pops up this confirmation request:

If "Yes" is clicked this is what will be produced:

Oh dear, I seem to have accidently deleted my whole discussion when I only meant to delete an unused draft I had saved.? My question was "How could I save the created map with a name constructed from the sector, subsector and deck variables in my script?" @Monsen suggested I use the SAVEASM command but I needed to be cautious in case this command terminated my script. Since I want to save all the map files to the same directory there was some discussion on how to do so. @Monsen then@Monsen recommended using either "$" or "@" prefixes, but the current location of a new map seems to be the installation directory (at least that's where my program first tries to save it) and while I don't mind saving my custom scripts and templates to the data directory (which I keep on an external hard drive), I prefer to save all my data files and downloads on a thumb drive (which requires an absolute path). After some discussion about using SAVEVARS to preserve that path I decided customizing the OnNewMacro or OnOpenMacro note of the template by adding the line "GL savefile SAVEASM path\" might be safer. (Doesn't calling a script inside another script terminate the calling script?) So my current question is "Which On__Macro note would it be better to customize?" IOW which one executes when the temporary (MAP).FCW file is created from the template?

Comments

Sign In or Register to comment.