REBOL [ Author: "Brett Handley" Purpose: "To use Rebol with Notetab text editor." Comment: { Processes the input. If arg is supplied it is assumed to be a doable expression. End-of-file marker is removed if found.} Installation: { You will have to make sure that Rebol will find this script when Notetab starts it. With windows NT, I placed this script in the same directory as rebol.exe. I made sure that the path environment variable included this directory as well.} ] random/seed now use-script: func [file [file!]][ DO join system/options/home [%library/ file] ] standard-input: function [ "Returns a string that comes from standard input." ; May not be suitable for large input streams. ] [buf-size inp inp-buffer log] [ buf-size: 30000 inp-buffer: make string! buf-size inp: make string! buf-size while [ clear inp-buffer 0 < read-io system/ports/input inp-buffer buf-size ] [ replace/all inp-buffer "^M" "" ; Handles CR on windows systems. append inp inp-buffer ] if all [ 0 < length? inp equal? last inp to-char 26 ] [ remove/part at inp length? inp 1 ] inp ] either system/options/args [ do system/script/args ] [ do standard-input ]