1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| str = "Lancement ...\r\n";
console.setParagraphAttributes(console.getLength(), str.length(), boldStyle, true);
console.insertString(0, str, boldStyle);
//*
str = "dir";
console.setParagraphAttributes(console.getLength(), str.length(), boldStyle, true);
console.insertString(console.getLength(), "> " + str + "\r\n", boldStyle);
shellobj.command(str).output(out).error(err).consume();
console.setParagraphAttributes(console.getLength(), out.toString().length(), normalStyle, true);
console.insertString(console.getLength(), out.toString(), null);
console.setParagraphAttributes(console.getLength(), err.toString().length(), alerteStyle, true);
console.insertString(console.getLength(), err.toString(), alerteStyle);
str = "del toto.txt";
console.setParagraphAttributes(console.getLength(), str.length(), boldStyle, true);
console.insertString(console.getLength(), "> " + str + "\r\n", boldStyle);
shellobj.command(str).output(out).error(err).consume();
console.setParagraphAttributes(console.getLength(), out.toString().length(), normalStyle, true);
console.insertString(console.getLength(), out.toString(), null);
console.setParagraphAttributes(console.getLength(), err.toString().length(), alerteStyle, true);
console.insertString(console.getLength(), err.toString(), alerteStyle);
str = "dir";
console.setParagraphAttributes(console.getLength(), str.length(), boldStyle, true);
console.insertString(console.getLength(), "> " + str + "\r\n", boldStyle);
shellobj.command(str).output(out).error(err).consume();
console.setParagraphAttributes(console.getLength(), out.toString().length(), normalStyle, true);
console.insertString(console.getLength(), out.toString(), null);
console.setParagraphAttributes(console.getLength(), err.toString().length(), alerteStyle, true);
console.insertString(console.getLength(), err.toString(), alerteStyle);
// */ |
Partager