Hello dear community
I tried to run windows command from an intersystems terminal using objectscript routine.
routine :
Zpipe quit ; CPIPE example to run host console command
cmd(command="",test=0) ;
if command="" set command="dir"
quit $$execute(command,test) execute(cmd,test) Public {
set dev="|CPIPE|1"
set $zt="cls"
set empty=0
open dev:cmd:0
write:test $test,!
else write "pipe failed",! quit 0
while empty<3 {
use dev read line
set empty=$s($l(line):0,1:$i(empty))
use 0 write line,! ;;; or do any kind of analysis of the line
} cls ;
set $zt=".png)



.png)



.png)