So much for an editor, but how do I start my R3 from a shell, not opening its own window? I would like to use it with Console2 or PowerShell. Is that possible with latest changes?
Carl Sassenrath 28-Oct-2009 8:30:30
A good question. To not open the R3 window, simply redirect its stdout stream (and often both stdio streams.)
In the setup options for those programs add a line like:
r3 -q <input >output
Of course many tools already know that, and do it automatically (like the editor example above.)
When you get it working, please post the lines here for other users to see. Thanks.
Reisacher 28-Oct-2009 10:04:03
Works flawlessly with SciTe
>C:\Usr\Program\Rebol3\r3.exe C:\Usr\Work\test.r
Checking for rebol.r file in /C/Usr/Program/Rebol3/
Evaluating: /C/Usr/Work/test.r
test
>Exit code: 0
PatrickP61 28-Oct-2009 13:51:21
For those of you who want to configure Crimson like Carl's example, do the following:
1. Select View / ToolBar/Views then select "Directory Window"
2. Also select "Output Window"
3. Select Tools / Preferences and check "Capture Output"
Brian Hawley 28-Oct-2009 18:12:35
Console2, PowerCMD and remote cmd.exe shells don't go through stdio, they use the console APIs. We can't tell them to do I/O redirection. The only way to make them work is by making a console app version of R3, rather than a GUI app that allocates a console rather than a GUI.
Adrian Sampaleanu 29-Oct-2009 19:35:18
I think I have everything the way it should be, using the SourceForge version of Crimson Edit (Crimson Editor SVN263 English in the About box), and all I get when evaluate the following script:
I am capturing output. Should I be using the old version?
Carl Sassenrath 30-Oct-2009 13:36:18
I'm using Crimson 3.60 from their website... and it seems to work fine. (I just downloaded it last week.)
The above example shows:
---------- Capture Output ----------
"C:\rebol\view.exe" -sq "C:\Program Files\Crimson Editor\test.r"
hello world
Terminated with exit code 0
Endo 31-Oct-2009 9:05:56
I've tested with perfect text editor called EditPlus on Windows. It works very well. Configuration is very simple, just add the R3.exe to the Tools and check the Capture Output option. Here is the output:
---------- R3 ----------
Checking for rebol.r file in /D/Rebol/R3/
Script: "Untitled" Version: none Date: none
this is rebol.r
Evaluating: /D/Rebol/R3/test.r
hello world
Output completed (0 sec consumed)
Endo 2-Nov-2009 5:21:45
EditPlus was not support to capture UTF8 output of a program yesterday. I send them a feature request and today it supports UTF8 :) They made it just in a few hours. Nice support :)