#This script is specific for win32 OS's xecho -b -c WinEXEC script loaded! xecho -b -c Written by gircobain ?/06/2002 revised 20/07/2002 xecho -b -c Further revision 26/12/2002 @delarray(winexec) @delarray(target) alias execho { if ([$*] != []) { @setitem(winexec $numitems(winexec) $*) @setitem(target $numitems(target) ) if (numitems(winexec) == 1) _run_exec }{ xecho -b Usage: /EXECHO } } alias execout { if ([$*] != []) { @setitem(winexec $numitems(winexec) $*) @setitem(target $numitems(target) $C) if (numitems(winexec) == 1) _run_exec }{ xecho -b Usage: /EXECOUT } } alias execmsg { if ([$#{$*}] > 1) { @setitem(winexec $numitems(winexec) $1-) @setitem(target $numitems(target) $0) if (numitems(winexec) == 1) _run_exec }{ xecho -b Not enough arguments xecho -b Usage: /EXECMSG } } alias _make_winexec (cmdline) { if (fexist(//c/winexec.bat) == 1) @unlink(//c/winexec.bat) @:fd = open(//c/winexec.bat w) @write($fd \@echo off) @write($fd $cmdline) @close($fd) } alias _run_exec { ^on ^exec_exit "WINEXEC % %" { @:target = getitem(target 0) @:fd = open(//c/winexec.out r) while (!eof($fd)) { @:line = read($fd) if (target != []) { if (line != []) msg $target $read($fd) }{ if (line != []) echo $read($fd) } } @close($fd) @delitem(winexec 0) @delitem(target 0) if (numitems(winexec)) { _make_winexec $getitem(winexec 0) exec -name WINEXEC c:/winexec.bat > c:/winexec.out }{ @unlink(//c/winexec.bat) @unlink(//c/winexec.out) on exec_exit -"WINEXEC % %" } } _make_winexec $getitem(winexec 0) exec -name WINEXEC c:/winexec.bat > c:/winexec.out }