-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathSRLLape.simba
87 lines (72 loc) · 1.78 KB
/
SRLLape.simba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
function iAbs(i: Integer): Integer;
begin
if (i < 0) then
Result := -i
else
Result := i;
end;
function ReplaceWrap(Text, FindStr, ReplaceStr: string; Flags: TReplaceFlags): string;
begin
Result := StringReplace(Text, FindStr, ReplaceStr, Flags);
end;
function GetTextAtExWrap(const xs, ys, xe, ye, minvspacing, maxvspacing, hspacing, color, tol: Integer; const font: string): string;
begin
Result := GetTextAtEx(xs, ys, xe, ye, minvspacing, maxvspacing, hspacing, color, tol, font);
end;
function InitializeHTTPClientWrap(HandleCookies: Boolean): Integer;
begin
Result := InitializeHTTPClient(HandleCookies);
end;
function ThreadSafeCall(s: string; params: TVariantArray): Variant;
begin
WriteLn('ThreadSafeCall "', s, '" (not supported in Lape)');
Result := NULL;
end;
function CallProc(s: string; params: TVariantArray): Variant;
begin
{$IFDEF Lape_ExposeGlobals}
Result := VariantInvoke(s, Params);
{$ELSE}
WriteLn('CallProc "', s, '" (not supported in Lape)');
Result := NULL;
{$ENDIF}
end;
{
function GetMufasaBitmap(bmp: Integer): Integer;
begin
Result := bmp;
end;
}
function ExceptionType: TIFException;
begin
WriteLn('ExceptionType is not supported in Lape');
Result := erCustomError;
end;
function ExceptionParam: string;
begin
WriteLn('ExceptionParam is not supported in Lape');
Result := '';
end;
const
GetTickCount_StartTime := GetTickCount;
function GetTickCount: UInt32; override;
begin
Result := inherited() - GetTickCount_StartTime;
end;
function GetSystemTime: LongWord; override;
begin
Result := GetTickCount;
end;
procedure TerminateScript; override;
begin
Halt();
end;
const
clWhite = 16777215;
clBlack = 0;
clRed = 255;
clGreen = 32768;
clBlue = 16711680;
clPurple = 8388736;
clYellow = 65535;
MaxInt = High(Integer);