And a question along those lines... How can you change the encoding of a file that you have open in Zeus. If you go to Options> Properties and make the change, it changes the definition for that whole file type. Also, I thought that I could do a "Save As" of the open document and specify a different encoding. But, when I do a File >Save As> Choose a different encoding > Save I get "File already exists..." which I would expect and to which I answer Yes. The another popup shows up with something like "The save requested can't be done because the file being saved is already open in the editor".
In the end, I can't figure out an easy way to change encoding???
I'm using 3.97o and if I have the Editor Option> File to Open Must Exist unticked
The file must exit option was added to stop the creation of unwanted files.
If you run Zeus from the command line and specify a file that does not exist, that file may/may not be created based on this flag.
I cannot "create" a new file from the "Open File" dialog.
That is standard Windows File Open dialog behaviour.
You need to instead use the file_select_dialog macro function.
There is an example of how to use this in the zScript\file_open.lua macro.
How can you change the encoding of a file that you have open in Zeus.
You can set it based on file extension.
You can also use the set_file_type(type) macro function to set the type of the active document.
The type value can be one of the following values:
Code: Select all
// ASCII = 0, // UTF8 = 1 // UNICODE = 2 // BINARY = 3
"The save requested can't be done because the file being saved is already open in the editor".
You might have found a bug
Zeus by design only allows the file to be opened once inside the editor.
That message is there for the case where you have files a.txt and b.txt open in Zeus and you then use the Save As to save b.txt to a.txt,thus breaking the above rule.