achso, aber ich weiss nict, ob das geht...
versuchs mal so:
Delphi-Quellcode:
unit Unit2;
interface
uses SysUtils, AgentObjects_TLB;
const
LMax = 2;
type
TCommandAction = (ccTrue, ccFalse, ccNoCommand);
function Inizialize(
const Command:
String; AgentItem: IAgentCtlCharacterEx): TCommandAction;
function ActCommand(Commands:
Array of String; AgentItem: IAgentCtlCharacterEx): TCommandAction;
implementation
function Inizialize(
const Command:
String; AgentItem: IAgentCtlCharacterEx): TCommandAction;
var
Commands:
Array[1..LMax]
of String;
i, j: Integer;
begin
j := 0;
if Length(Command) > 0
then
begin
for i := 0
to Length(Command) - 1
do
if Command[i] <> '
'
then
Commands[j] := Commands[j] + Command[i]
else
if j < Lmax
then
inc(j)
else
break;
Result := ActCommand(Commands, AgentItem);
end
else
Result := ccFalse;
end;
function ActCommand(Commands:
Array of String; AgentItem: IAgentCtlCharacterEx): TCommandAction;
var
hilfsstring:
string;
begin
//hier die änderung!!
hilfsstring:=Commands[1];
if hilfsstring[1] = '
:'
then //Hier tritt sie auf.... hm....
begin
result := ccTrue;
end
else
result := ccNoCommand;
end;
end.