Some basic emeditor scripts for formatting json and running builds.
This commit is contained in:
parent
093615aeab
commit
5c26c09815
2 changed files with 33 additions and 0 deletions
17
scripts/emeditor/shell.js
Normal file
17
scripts/emeditor/shell.js
Normal 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();
|
Loading…
Add table
Add a link
Reference in a new issue