Some basic emeditor scripts for formatting json and running builds.

This commit is contained in:
Tomasz Półgrabia 2025-01-27 00:58:20 +01:00
parent 093615aeab
commit 5c26c09815
2 changed files with 33 additions and 0 deletions

17
scripts/emeditor/shell.js Normal file
View file

@ -0,0 +1,17 @@
function readAll(filename) {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var txtFile = fso.OpenTextFile(filename, 1, false, 0);
var fText = txtFile.ReadAll();
txtFile.Close();
return fText;
}
shell.Run("cmd", 3, true, "/c dir | tee %TEMP%/output.log");
// editor.OpenFile("%TEMP%/output.log");
var temp = shell.GetEnv("TEMP");
var v = readAll(temp + "\\output.log");
OutputBar.writeln(v);
OutputBar.Visible = true;
OutputBar.SetFocus();