Re: Save as routine
- Posted by K_D_R Nov 20, 2012
- 1880 views
OOPS! I deleted the "sa", "Save as" micro. The file, although renamed, was being saved before the macro label could erase itself.
A "save as" routine could be added to the get_escape elsif clauses like so:
-- insert the following code into: procedure get_escape(boolean help) -- add 'W' to the list of hot-keys in the following code section: command = key_gets("hcqswnedfrlmW/`\'\"", {}) & ' ' elsif command[1] = 'W' then copy_file(file_name, file_name & ".bak", 1) -- back up original file. set_top_line(" ") file_name = prompt_string("Save file as: ") save_file(file_name) stop = FALSE refresh_all_windows()