Macro Question: Close Current File

I have a macro that opens a hardcoded file and copies the data into a variable for processing.

After that I need to close the file because I do not want to see the file I loaded into the buffer for any reason.

How do I close the buffer after I have done:“c:/dev/func.lst”);
var buf = document.buffer;

Or maybe there is a better way to load a text file into a variable that I could not find.

Actually opening the file in Komodo (ie the UI) will be a bit overkill for what you’re wanting to do, I’d recommend having a look this -

For closing the current edit file, you could use:

// There is also this one - to avoid the save prompt when the file is dirty:

though you may not even need to open it inside of Komodo - like Nathan says - as there are APIs to open and close files in memory (rather than having to open them in the Komodo editor).