mirror of https://gitlab.com/basile.b/dexed.git
procinput widget, input text supports symstrings
This commit is contained in:
parent
be340d4f20
commit
fa3165bd2c
|
@ -16,8 +16,8 @@ void main(string args[])
|
||||||
//
|
//
|
||||||
version(Windows)
|
version(Windows)
|
||||||
string prgname = "cmd";
|
string prgname = "cmd";
|
||||||
else
|
/*else
|
||||||
version(linux) string prgname = "xterm";
|
version(linux) string prgname = "xterm";*/
|
||||||
else
|
else
|
||||||
assert(0, "unsupported target");
|
assert(0, "unsupported target");
|
||||||
//
|
//
|
||||||
|
|
|
@ -6,7 +6,7 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||||
Menus, StdCtrls, ce_widget, process, ce_common;
|
Menus, StdCtrls, ce_widget, process;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@ type
|
||||||
implementation
|
implementation
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
|
uses
|
||||||
|
ce_common, ce_symstring;
|
||||||
|
|
||||||
procedure TCEProcInputWidget.setProc(const aValue: TProcess);
|
procedure TCEProcInputWidget.setProc(const aValue: TProcess);
|
||||||
begin
|
begin
|
||||||
txtExeName.Caption := 'no process';
|
txtExeName.Caption := 'no process';
|
||||||
|
@ -44,6 +47,9 @@ procedure TCEProcInputWidget.sendInput;
|
||||||
var
|
var
|
||||||
inp: string;
|
inp: string;
|
||||||
begin
|
begin
|
||||||
|
if txtInp.Text <> '' then
|
||||||
|
inp := symbolExpander.get(txtInp.Text) + lineEnding
|
||||||
|
else
|
||||||
inp := txtInp.Text + lineEnding;
|
inp := txtInp.Text + lineEnding;
|
||||||
fProc.Input.Write(inp[1], length(inp));
|
fProc.Input.Write(inp[1], length(inp));
|
||||||
txtInp.Text := '';
|
txtInp.Text := '';
|
||||||
|
|
Loading…
Reference in New Issue