Re: Save as routine

new topic     » goto parent     » topic index » view thread      » older message » newer message

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() 
 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu