mirror of https://gitlab.com/basile.b/dexed.git
custom tools, allow to interpolate the parameters with the result of the input query, close #53
This commit is contained in:
parent
d2bbe29e88
commit
cc4fdbfc40
|
@ -193,6 +193,7 @@ end;
|
||||||
|
|
||||||
procedure TCEToolItem.execute(previous: TCEToolItem);
|
procedure TCEToolItem.execute(previous: TCEToolItem);
|
||||||
var
|
var
|
||||||
|
arg: string;
|
||||||
prm: string;
|
prm: string;
|
||||||
inp: string;
|
inp: string;
|
||||||
old: string;
|
old: string;
|
||||||
|
@ -220,7 +221,14 @@ begin
|
||||||
begin
|
begin
|
||||||
prm := '';
|
prm := '';
|
||||||
if InputQuery('Parameters', '', prm) then
|
if InputQuery('Parameters', '', prm) then
|
||||||
if prm.isNotEmpty then fProcess.Parameters.AddText(fSymStringExpander.expand(prm));
|
begin
|
||||||
|
prm := fSymStringExpander.expand(prm);
|
||||||
|
arg := StringReplace(fParameters.Text, '<$1>', prm, [rfReplaceAll]);
|
||||||
|
if prm.isNotEmpty and (arg = fParameters.Text) then
|
||||||
|
fProcess.Parameters.AddText(prm)
|
||||||
|
else
|
||||||
|
fProcess.Parameters.Text := arg;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
ensureNoPipeIfWait(fProcess);
|
ensureNoPipeIfWait(fProcess);
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue