|
@@ -1,7 +1,7 @@
|
|
|
unit BGRAScript;
|
|
unit BGRAScript;
|
|
|
|
|
|
|
|
{$mode objfpc}{$H+}
|
|
{$mode objfpc}{$H+}
|
|
|
-{$define debug}
|
|
|
|
|
|
|
+{ $define debug}
|
|
|
|
|
|
|
|
interface
|
|
interface
|
|
|
|
|
|
|
@@ -11,8 +11,9 @@ uses
|
|
|
{Template}
|
|
{Template}
|
|
|
procedure SynCompletionList(itemlist: TStrings);
|
|
procedure SynCompletionList(itemlist: TStrings);
|
|
|
{Scripting}
|
|
{Scripting}
|
|
|
-function ScriptCommand(command: string; bitmap: TBGRABitmap; variables: TStringList): boolean;
|
|
|
|
|
-function ScriptCommandList(commandlist: TStrings; bitmap: TBGRABitmap): boolean;
|
|
|
|
|
|
|
+function ScriptCommand(command: string; var bitmap: TBGRABitmap;
|
|
|
|
|
+ var variables: TStringList): boolean;
|
|
|
|
|
+function ScriptCommandList(commandlist: TStrings; var bitmap: TBGRABitmap): boolean;
|
|
|
|
|
|
|
|
{Tools}
|
|
{Tools}
|
|
|
function StrToDrawMode(mode: string): TDrawMode;
|
|
function StrToDrawMode(mode: string): TDrawMode;
|
|
@@ -83,7 +84,8 @@ begin
|
|
|
end;
|
|
end;
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
-function ScriptCommand(command: string; bitmap: TBGRABitmap; variables: TStringList): boolean;
|
|
|
|
|
|
|
+function ScriptCommand(command: string; var bitmap: TBGRABitmap;
|
|
|
|
|
+ var variables: TStringList): boolean;
|
|
|
|
|
|
|
|
function ParamCheck(passed, mustbe: integer): boolean;
|
|
function ParamCheck(passed, mustbe: integer): boolean;
|
|
|
begin
|
|
begin
|
|
@@ -116,7 +118,7 @@ begin
|
|
|
passed := list.Count;
|
|
passed := list.Count;
|
|
|
|
|
|
|
|
{Replace values in variable names}
|
|
{Replace values in variable names}
|
|
|
- for i:=0 to list.Count -1 do
|
|
|
|
|
|
|
+ for i := 0 to list.Count - 1 do
|
|
|
if variables.Values[list[i]] <> '' then
|
|
if variables.Values[list[i]] <> '' then
|
|
|
list[i] := variables.Values[list[i]];
|
|
list[i] := variables.Values[list[i]];
|
|
|
|
|
|
|
@@ -562,9 +564,11 @@ begin
|
|
|
writeln(' ' + list[i]);
|
|
writeln(' ' + list[i]);
|
|
|
writeln('____________________');
|
|
writeln('____________________');
|
|
|
{$endif}
|
|
{$endif}
|
|
|
|
|
+
|
|
|
|
|
+ list.Free;
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
-function ScriptCommandList(commandlist: TStrings; bitmap: TBGRABitmap): boolean;
|
|
|
|
|
|
|
+function ScriptCommandList(commandlist: TStrings; var bitmap: TBGRABitmap): boolean;
|
|
|
var
|
|
var
|
|
|
i: integer;
|
|
i: integer;
|
|
|
variables: TStringList;
|
|
variables: TStringList;
|