1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-01-05 18:58:07 -05:00

Lape: Update wrappers.

Squashes following commits:

-   Lape: New wrappers.
-   Lape: Updated exported methods.
-   Lape: Renamed wrapper files.
-   Lape: Renamed methods in exported methods.
-   Lape: Update MMLPSThread.
-   Lape: Compilation fixes.
This commit is contained in:
Merlijn Wajer 2011-08-06 14:26:38 +02:00
parent 43ccca0aff
commit f45d6bbad7
25 changed files with 844 additions and 222 deletions

View File

@ -1,4 +0,0 @@
procedure Lape_ColorToRGB(const Params: PParamArray);
begin
ps_ColorToRGB(Pinteger(Params^[0])^, PInteger(Params^[1])^, PInteger(Params^[2])^, PInteger(Params^[3])^);
end;

View File

@ -1,4 +0,0 @@
procedure Lape_haval(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_haval(Pstring(Params^[0])^);
end;

View File

@ -0,0 +1,49 @@
procedure Lape_ColorToRGB(const Params: PParamArray);
begin
ps_ColorToRGB(Pinteger(Params^[0])^, PInteger(Params^[1])^, PInteger(Params^[2])^, PInteger(Params^[3])^);
end;
procedure Lape_RGBtoColor(const Params: PParamArray; const Result: Pointer);
begin
PColor(Result)^ := ps_RGBtoColor(PInteger(Params^[0])^, PInteger(Params^[1])^, PInteger(Params^[2])^);
end;
procedure Lape_ColorToHSL(const Params: PParamArray);
begin
ps_ColorToHSL(PInteger(Params^[0])^, PExtended(Params^[1])^, PExtended(Params^[2])^, PExtended(Params^[3])^);
end;
procedure Lape_HSLToColor(const Params: PParamArray; const Result: Pointer);
begin
PColor(Result)^ := ps_HSLToColor(PExtended(Params^[0])^, PExtended(Params^[1])^, PExtended(Params^[2])^);
end;
procedure Lape_ColorToXYZ(const Params: PParamArray);
begin
ps_ColorToXYZ(PInteger(Params^[0])^, PExtended(Params^[1])^, PExtended(Params^[2])^, PExtended(Params^[3])^);
end;
procedure Lape_XYZToColor(const Params: PParamArray; const Result: Pointer);
begin
PColor(Result)^ := ps_XYZToColor(PExtended(Params^[0])^, PExtended(Params^[1])^, PExtended(Params^[2])^);
end;
procedure Lape_RGBToHSL(const Params: PParamArray);
begin
ps_RGBToHSL(PInteger(Params^[0])^, PInteger(Params^[1])^, PInteger(Params^[2])^, PExtended(Params^[3])^, PExtended(Params^[4])^, PExtended(Params^[5])^);
end;
procedure Lape_HSLtoRGB(const Params: PParamArray);
begin
ps_HSLtoRGB(Pextended(Params^[0])^, Pextended(Params^[1])^, Pextended(Params^[2])^, PInteger(Params^[3])^, PInteger(Params^[4])^, PInteger(Params^[5])^);
end;
procedure Lape_RGBToXYZ(const Params: PParamArray);
begin
ps_RGBToXYZ(PInteger(Params^[0])^, PInteger(Params^[1])^, PInteger(Params^[2])^, PExtended(Params^[3])^, PExtended(Params^[4])^, PExtended(Params^[5])^);
end;
procedure Lape_XYZToRGB(const Params: PParamArray);
begin
ps_XYZToRGB(PExtended(Params^[0])^, PExtended(Params^[1])^, PExtended(Params^[2])^, PInteger(Params^[3])^, PInteger(Params^[4])^, PInteger(Params^[5])^);
end;

View File

@ -0,0 +1,49 @@
procedure Lape_haval(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_haval(Pstring(Params^[0])^);
end;
procedure Lape_md4(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_md4(Pstring(Params^[0])^);
end;
procedure Lape_md5(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_md5(Pstring(Params^[0])^);
end;
procedure Lape_ripemd128(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_ripemd128(Pstring(Params^[0])^);
end;
procedure Lape_ripemd160(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_ripemd160(Pstring(Params^[0])^);
end;
procedure Lape_sha1(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_sha1(Pstring(Params^[0])^);
end;
procedure Lape_sha256(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_sha256(Pstring(Params^[0])^);
end;
procedure Lape_sha384(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_sha384(Pstring(Params^[0])^);
end;
procedure Lape_sha512(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_sha512(Pstring(Params^[0])^);
end;
procedure Lape_tiger(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_tiger(Pstring(Params^[0])^);
end;

View File

@ -87,3 +87,18 @@ procedure Lape_WriteINI(const Params: PParamArray);
begin
ps_WriteINI(Pstring(Params^[0])^, Pstring(Params^[1])^, Pstring(Params^[2])^, Pstring(Params^[3])^);
end;
procedure Lape_ReadINI(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_ReadINI(Pstring(Params^[0])^, Pstring(Params^[1])^, Pstring(Params^[2])^);
end;
procedure Lape_DeleteINI(const Params: PParamArray);
begin
ps_DeleteINI(Pstring(Params^[0])^, Pstring(Params^[1])^, Pstring(Params^[2])^);
end;
procedure Lape_ExtractFileExt(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_ExtractFileExt(Pstring(Params^[0])^);
end;

View File

@ -0,0 +1,299 @@
procedure Lape_round(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_round(Pextended(Params^[0])^);
end;
procedure Lape_iAbs(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_iAbs(Pinteger(Params^[0])^);
end;
procedure Lape_ceil(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_ceil(Pextended(Params^[0])^);
end;
procedure Lape_pow(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_pow(Pextended(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_RiemannGauss(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_RiemannGauss(Pextended(Params^[0])^, Pextended(Params^[1])^, Pextended(Params^[2])^, Pinteger(Params^[3])^);
end;
procedure Lape_DiscreteGauss(const Params: PParamArray; const Result: Pointer);
begin
PExtendedArray(Result)^ := ps_DiscreteGauss(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pextended(Params^[2])^);
end;
procedure Lape_GaussMatrix(const Params: PParamArray; const Result: Pointer);
begin
P2DExtendedArray(Result)^ := ps_GaussMatrix(Pinteger(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_exp(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_exp(Pextended(Params^[0])^);
end;
procedure Lape_Max(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_Max(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_Min(const Params: PParamArray; const Result: Pointer);
begin
PInteger(Result)^ := ps_Min(PInteger(Params^[0])^, PInteger(Params^[1])^);
end;
procedure Lape_MinE(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_MinE(Pextended(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_MaxE(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_MaxE(Pextended(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_Sqr(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Sqr(Pextended(Params^[0])^);
end;
procedure Lape_Point(const Params: PParamArray; const Result: Pointer);
begin
PPoint(Result)^ := ps_Point(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_Distance(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_Distance(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pinteger(Params^[2])^, Pinteger(Params^[3])^);
end;
procedure Lape_Hypot(const Params: PParamArray; const Result: Pointer);
begin
PExtended(Result)^ := ps_Hypot(PExtended(Params^[0])^, PExtended(Params^[1])^);
end;
procedure Lape_RandomRange(const Params: PParamArray; const Result: Pointer);
begin
PInteger(Result)^ := ps_RandomRange(PInteger(Params^[0])^, PInteger(Params^[1])^);
end;
procedure Lape_Random(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_Random(Pinteger(Params^[0])^);
end;
procedure Lape_RandomE(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_RandomE();
end;
procedure Lape_ArcTan2(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_ArcTan2(Pextended(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_IncEx(const Params: PParamArray);
begin
ps_IncEx(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_DecEx(const Params: PParamArray);
begin
ps_DecEx(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_Factorial(const Params: PParamArray; const Result: Pointer);
begin
PInt64(Result)^ := ps_Factorial(Plongword(Params^[0])^);
end;
procedure Lape_BinCoe(const Params: PParamArray; const Result: Pointer);
begin
PExtended(Result)^ := ps_BinCoe(PLongInt(Params^[0])^, PLongInt(Params^[1])^);
end;
procedure Lape_FixD(const Params: PParamArray; const Result: Pointer);
begin
PExtended(Result)^ := ps_FixD(Pextended(Params^[0])^);
end;
procedure Lape_InRange(const Params: PParamArray; const Result: Pointer);
begin
Pboolean(Result)^ := ps_InRange(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pinteger(Params^[2])^);
end;
procedure Lape_IntToBox(const Params: PParamArray; const Result: Pointer);
begin
PBox(Result)^ := ps_IntToBox(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pinteger(Params^[2])^, Pinteger(Params^[3])^);
end;
procedure Lape_IntInBox(const Params: PParamArray; const Result: Pointer);
begin
PBoolean(Result)^ := ps_IntInBox(PInteger(Params^[0])^, PInteger(Params^[1])^, PBox(Params^[2])^);
end;
procedure Lape_PointToBox(const Params: PParamArray; const Result: Pointer);
begin
PBox(Result)^ := ps_PointToBox(PPoint(Params^[0])^, PPoint(Params^[1])^);
end;
procedure Lape_PointInBox(const Params: PParamArray; const Result: Pointer);
begin
PBoolean(Result)^ := ps_PointInBox(PPoint(Params^[0])^, PBox(Params^[1])^);
end;
procedure Lape_floor(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_floor(Pextended(Params^[0])^);
end;
procedure Lape_logn(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_logn(Pextended(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_ln(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_ln(Pextended(Params^[0])^);
end;
procedure Lape_inttohex(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_inttohex(Pinteger(Params^[0])^);
end;
procedure Lape_hextoint(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_hextoint(Pstring(Params^[0])^);
end;
procedure Lape_sar(const Params: PParamArray; const Result: Pointer);
begin
Plongint(Result)^ := ps_sar(Plongint(Params^[0])^, Pbyte(Params^[1])^);
end;
procedure Lape_ror(const Params: PParamArray; const Result: Pointer);
begin
PLongWord(Result)^ := ps_ror(Plongword(Params^[0])^, Pbyte(Params^[1])^);
end;
procedure Lape_rol(const Params: PParamArray; const Result: Pointer);
begin
PLongWord(Result)^ := ps_rol(Plongword(Params^[0])^, Pbyte(Params^[1])^);
end;
procedure Lape_tan(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_tan(Pextended(Params^[0])^);
end;
procedure Lape_radians(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_radians(Pextended(Params^[0])^);
end;
procedure Lape_degrees(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_degrees(Pextended(Params^[0])^);
end;
procedure Lape_ArcSin(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_ArcSin(Pextended(Params^[0])^);
end;
procedure Lape_ArcCos(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_ArcCos(Pextended(Params^[0])^);
end;
procedure Lape_ArcTan(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_ArcTan(Pextended(Params^[0])^);
end;
procedure Lape_Cotan(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Cotan(Pextended(Params^[0])^);
end;
procedure Lape_Secant(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Secant(Pextended(Params^[0])^);
end;
procedure Lape_Cosecant(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Cosecant(Pextended(Params^[0])^);
end;
procedure Lape_Cot(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Cot(Pextended(Params^[0])^);
end;
procedure Lape_Sec(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Sec(Pextended(Params^[0])^);
end;
procedure Lape_Csc(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Csc(Pextended(Params^[0])^);
end;
procedure Lape_Cosh(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Cosh(Pextended(Params^[0])^);
end;
procedure Lape_Sinh(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Sinh(Pextended(Params^[0])^);
end;
procedure Lape_Tanh(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Tanh(Pextended(Params^[0])^);
end;
procedure Lape_CotH(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_CotH(Pextended(Params^[0])^);
end;
procedure Lape_SecH(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_SecH(Pextended(Params^[0])^);
end;
procedure Lape_CscH(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_CscH(Pextended(Params^[0])^);
end;
procedure Lape_ArcCosh(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_ArcCosh(Pextended(Params^[0])^);
end;
procedure Lape_ArcSinh(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_ArcSinh(Pextended(Params^[0])^);
end;
procedure Lape_DecRet(const Params: PParamArray; const Result: Pointer);
begin
PExtended(Result)^ := DecRet(PExtended(Params^[0])^);
end;
procedure Lape_log10(const Params: PParamArray; const Result: Pointer);
begin
PExtended(Result)^ := ps_log10(PExtended(Params^[0])^);
end;

View File

@ -0,0 +1,64 @@
procedure Lape_rs_GetUpText(const Params: PParamArray; const Result: Pointer);
begin
PString(Result)^ := ps_rs_GetUpText();
end;
procedure Lape_rs_GetUpTextAtEx(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_rs_GetUpTextAtEx(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pboolean(Params^[2])^);
end;
procedure Lape_rs_GetUpTextAt(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_rs_GetUpTextAt(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_BitmapFromText(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_BitmapFromText(PString(Params^[0])^, PString(Params^[1])^);
end;
procedure Lape_MaskFromText(const Params: PParamArray; const Result: Pointer);
begin
PMask(Result)^ := ps_MaskFromText(PString(Params^[0])^, PString(Params^[1])^);
end;
procedure Lape_TPAFromTextWrap(const Params: PParamArray);
begin
ps_TPAFromTextWrap(PString(Params^[0])^, PString(Params^[1])^, Pinteger(Params^[2])^, Pinteger(Params^[3])^, PPointArray(Params^[4])^);
end;
procedure Lape_TPAFromText(const Params: PParamArray; const Result: Pointer);
begin
PPointArray(Result)^ := ps_TPAFromText(PString(Params^[0])^, PString(Params^[1])^, Pinteger(Params^[2])^, Pinteger(Params^[3])^);
end;
procedure Lape_GetTextATPA(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_GetTextATPA(P2DPointArray(Params^[0])^, Pinteger(Params^[1])^, Pstring(Params^[2])^);
end;
procedure Lape_GetTextAt(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_GetTextAt(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pinteger(Params^[2])^, Pinteger(Params^[3])^, Pinteger(Params^[4])^, Pinteger(Params^[5])^, Pinteger(Params^[6])^, Pinteger(Params^[7])^, Pstring(Params^[8])^);
end;
procedure Lape_GetTextAtEx(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_GetTextAtEx(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pinteger(Params^[2])^, Pinteger(Params^[3])^, Pinteger(Params^[4])^, Pinteger(Params^[5])^, Pinteger(Params^[6])^, Pinteger(Params^[7])^, Pinteger(Params^[8])^, Pstring(Params^[9])^);
end;
procedure Lape_LoadSystemFont(const Params: PParamArray; const Result: Pointer);
begin
Pboolean(Result)^ := ps_LoadSystemFont(PFont(Params^[0])^, Pstring(Params^[1])^);
end;
procedure Lape_LoadFont(const Params: PParamArray; const Result: Pointer);
begin
Pboolean(Result)^ := ps_LoadFont(Pstring(Params^[0])^, Pboolean(Params^[1])^);
end;
procedure Lape_FreeFont(const Params: PParamArray; const Result: Pointer);
begin
Pboolean(Result)^ := ps_FreeFont(Pstring(Params^[0])^);
end;

View File

@ -0,0 +1,169 @@
procedure Lape_Writeln(const Params: PParamArray);
begin
ps_Writeln(Pstring(Params^[0])^);
end;
procedure Lape_SetScriptProp(const Params: PParamArray; const Result: Pointer);
begin
Pboolean(Result)^ := ps_SetScriptProp(PSP_Property(Params^[0])^, PVariantArray(Params^[1])^);
end;
procedure Lape_GetScriptProp(const Params: PParamArray; const Result: Pointer);
begin
Pboolean(Result)^ := ps_GetScriptProp(PSP_Property(Params^[0])^, PVariantArray(Params^[1])^);
end;
procedure Lape_Wait(const Params: PParamArray);
begin
ps_Wait(PDWord(Params^[0])^);
end;
procedure Lape_PlaySound(const Params: PParamArray);
begin
ps_PlaySound(Pstring(Params^[0])^);
end;
procedure Lape_StopSound(const Params: PParamArray);
begin
ps_StopSound();
end;
procedure Lape_ClearDebug(const Params: PParamArray);
begin
ps_ClearDebug();
end;
procedure Lape_SetSupressExceptions(const Params: PParamArray);
begin
ps_SetSupressExceptions(Pboolean(Params^[0])^);
end;
procedure Lape_SaveScreenshot(const Params: PParamArray);
begin
ps_SaveScreenshot(Pstring(Params^[0])^);
end;
procedure Lape_DisplayDebugImgWindow(const Params: PParamArray);
begin
ps_DisplayDebugImgWindow(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_DrawBitmapDebugImg(const Params: PParamArray);
begin
ps_DrawBitmapDebugImg(Pinteger(Params^[0])^);
end;
procedure Lape_GetDebugBitmap(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_GetDebugBitmap();
end;
procedure Lape_ClearDebugImg(const Params: PParamArray);
begin
ps_ClearDebugImg();
end;
procedure Lape_Status(const Params: PParamArray);
begin
ps_Status(Pstring(Params^[0])^);
end;
procedure Lape_Disguise(const Params: PParamArray);
begin
ps_Disguise(Pstring(Params^[0])^);
end;
procedure Lape_ShowMessage(const Params: PParamArray);
begin
ps_ShowMessage(Pstring(Params^[0])^);
end;
procedure Lape_MessageBox(const Params: PParamArray; const Result: Pointer);
begin
PInteger(Result)^ := ps_MessageBox(Pstring(Params^[0])^, Pstring(Params^[1])^, PLongInt(Params^[2])^);
end;
//procedure Lape_MessageDlg(const Params: PParamArray; const Result: Pointer);
//begin
// Pinteger(Result)^ := ps_MessageDlg(Pstring(Params^[0])^, Pstring(Params^[1])^, PMsgDlgType(Params^[2])^, PMsgDlgButtons(Params^[3])^);
//end;
procedure Lape_InputQuery(const Params: PParamArray; const Result: Pointer);
begin
PBoolean(Result)^ := ps_InputQuery(PString(Params^[0])^, PString(Params^[1])^, PString(Params^[2])^);
end;
procedure Lape_TerminateScript(const Params: PParamArray);
begin
ps_TerminateScript();
end;
procedure Lape_GetTimeRunning(const Params: PParamArray; const Result: Pointer);
begin
PLongWord(Result)^ := ps_GetTimeRunning();
end;
//procedure Lape_GetTClient(const Params: PParamArray; const Result: Pointer);
//begin
// PClient(Result)^ := ps_GetTClient();
//end;
procedure Lape_ConvertTime(const Params: PParamArray);
begin
ps_ConvertTime(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pinteger(Params^[2])^, Pinteger(Params^[3])^);
end;
procedure Lape_DecodeDate(const Params: PParamArray);
begin
ps_DecodeDate(PDateTime(Params^[0])^, PWord(Params^[1])^, PWord(Params^[2])^, PWord(Params^[3])^);
end;
procedure Lape_DecodeTime(const Params: PParamArray);
begin
ps_DecodeTime(PDateTime(Params^[0])^, Pword(Params^[1])^, Pword(Params^[2])^, Pword(Params^[3])^, Pword(Params^[4])^);
end;
procedure Lape_Now(const Params: PParamArray; const Result: Pointer);
begin
PDateTime(Result)^ := ps_Now();
end;
procedure Lape_Date(const Params: PParamArray; const Result: Pointer);
begin
PDateTime(Result)^ := ps_Date();
end;
procedure Lape_GetTickCount(const Params: PParamArray; const Result: Pointer);
begin
PLongword(Result)^ := ps_GetTickCount();
end;
procedure Lape_HakunaMatata(const Params: PParamArray);
begin
ps_HakunaMatata();
end;
procedure Lape_Simba(const Params: PParamArray);
begin
ps_Simba();
end;
procedure Lape_SetClipBoard(const Params: PParamArray);
begin
ps_SetClipBoard(Pstring(Params^[0])^);
end;
procedure Lape_GetClipBoard(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_GetClipBoard();
end;
//procedure Lape_GetProcesses(const Params: PParamArray; const Result: Pointer);
//begin
// PSysProcArr(Result)^ := ps_GetProcesses();
//end;
//
//procedure Lape_SetTarget(const Params: PParamArray);
//begin
// ps_SetTarget(PSysProc(Params^[0])^);
//end;

View File

@ -82,3 +82,53 @@ procedure Lape_Between(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_Between(Pstring(Params^[0])^, Pstring(Params^[1])^, Pstring(Params^[2])^);
end;
procedure Lape_Implode(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_Implode(Pstring(Params^[0])^, PStringArray(Params^[1])^);
end;
procedure Lape_Explode(const Params: PParamArray; const Result: Pointer);
begin
PStringArray(Result)^ := ps_Explode(Pstring(Params^[0])^, Pstring(Params^[1])^);
end;
procedure Lape_ExplodeWrap(const Params: PParamArray);
begin
ps_ExplodeWrap(Pstring(Params^[0])^, Pstring(Params^[1])^, PStringArray(Params^[2])^);
end;
procedure Lape_Padl(const Params: PParamArray; const Result: Pointer);
begin
PString(Result)^ := ps_Padl(PString(Params^[0])^, PlongInt(Params^[1])^);
end;
procedure Lape_Padz(const Params: PParamArray; const Result: Pointer);
begin
PString(Result)^ := ps_Padz(PString(Params^[0])^, PlongInt(Params^[1])^);
end;
procedure Lape_Padr(const Params: PParamArray; const Result: Pointer);
begin
PString(Result)^ := ps_Padr(PString(Params^[0])^, PlongInt(Params^[1])^);
end;
procedure Lape_ExecRegExpr(const Params: PParamArray; const Result: Pointer);
begin
Pboolean(Result)^ := ps_ExecRegExpr(PString(Params^[0])^, PString(Params^[1])^);
end;
//procedure Lape_SplitRegExpr(const Params: PParamArray);
//begin
// ps_SplitRegExpr(PString(Params^[0])^, PString(Params^[1])^, PStrings(Params^[2])^);
//end;
procedure Lape_ReplaceRegExpr(const Params: PParamArray; const Result: Pointer);
begin
PString(Result)^ := ps_ReplaceRegExpr(PString(Params^[0])^, PString(Params^[1])^, PString(Params^[2])^, Pboolean(Params^[3])^);
end;
procedure Lape_posex(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_posex(PString(Params^[0])^, PString(Params^[1])^, Pinteger(Params^[2])^);
end;

View File

@ -1,114 +0,0 @@
procedure Lape_round(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_round(Pextended(Params^[0])^);
end;
procedure Lape_iAbs(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_iAbs(Pinteger(Params^[0])^);
end;
procedure Lape_ceil(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_ceil(Pextended(Params^[0])^);
end;
procedure Lape_pow(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_pow(Pextended(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_RiemannGauss(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_RiemannGauss(Pextended(Params^[0])^, Pextended(Params^[1])^, Pextended(Params^[2])^, Pinteger(Params^[3])^);
end;
procedure Lape_DiscreteGauss(const Params: PParamArray; const Result: Pointer);
begin
PExtendedArray(Result)^ := ps_DiscreteGauss(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pextended(Params^[2])^);
end;
procedure Lape_GaussMatrix(const Params: PParamArray; const Result: Pointer);
begin
P2DExtendedArray(Result)^ := ps_GaussMatrix(Pinteger(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_exp(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_exp(Pextended(Params^[0])^);
end;
procedure Lape_Max(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_Max(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_Min(const Params: PParamArray; const Result: Pointer);
begin
PInteger(Result)^ := ps_Min(PInteger(Params^[0])^, PInteger(Params^[1])^);
end;
procedure Lape_MinE(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_MinE(Pextended(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_MaxE(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_MaxE(Pextended(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_Sqr(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_Sqr(Pextended(Params^[0])^);
end;
procedure Lape_Point(const Params: PParamArray; const Result: Pointer);
begin
PPoint(Result)^ := ps_Point(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_Distance(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_Distance(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pinteger(Params^[2])^, Pinteger(Params^[3])^);
end;
procedure Lape_Hypot(const Params: PParamArray; const Result: Pointer);
begin
PExtended(Result)^ := ps_Hypot(PExtended(Params^[0])^, PExtended(Params^[1])^);
end;
procedure Lape_RandomRange(const Params: PParamArray; const Result: Pointer);
begin
PInteger(Result)^ := ps_RandomRange(PInteger(Params^[0])^, PInteger(Params^[1])^);
end;
procedure Lape_Random(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_Random(Pinteger(Params^[0])^);
end;
procedure Lape_RandomE(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_RandomE();
end;
procedure Lape_ArcTan2(const Params: PParamArray; const Result: Pointer);
begin
Pextended(Result)^ := ps_ArcTan2(Pextended(Params^[0])^, Pextended(Params^[1])^);
end;
procedure Lape_IncEx(const Params: PParamArray);
begin
ps_IncEx(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_DecEx(const Params: PParamArray);
begin
ps_DecEx(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_Factorial(const Params: PParamArray; const Result: Pointer);
begin
PInt64(Result)^ := ps_Factorial(Plongword(Params^[0])^);
end;

View File

@ -1,19 +0,0 @@
procedure Lape_rs_GetUpText(const Params: PParamArray; const Result: Pointer);
begin
PString(Result)^ := ps_rs_GetUpText();
end;
procedure Lape_rs_GetUpTextAtEx(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_rs_GetUpTextAtEx(Pinteger(Params^[0])^, Pinteger(Params^[1])^, Pboolean(Params^[2])^);
end;
procedure Lape_rs_GetUpTextAt(const Params: PParamArray; const Result: Pointer);
begin
Pstring(Result)^ := ps_rs_GetUpTextAt(Pinteger(Params^[0])^, Pinteger(Params^[1])^);
end;
procedure Lape_BitmapFromText(const Params: PParamArray; const Result: Pointer);
begin
Pinteger(Result)^ := ps_BitmapFromText(PString(Params^[0])^, PString(Params^[1])^);
end;

View File

@ -1,19 +0,0 @@
procedure Lape_Writeln(const Params: PParamArray);
begin
ps_Writeln(Pstring(Params^[0])^);
end;
procedure Lape_SetScriptProp(const Params: PParamArray; const Result: Pointer);
begin
Pboolean(Result)^ := ps_SetScriptProp(PSP_Property(Params^[0])^, PVariantArray(Params^[1])^);
end;
procedure Lape_GetScriptProp(const Params: PParamArray; const Result: Pointer);
begin
Pboolean(Result)^ := ps_GetScriptProp(PSP_Property(Params^[0])^, PVariantArray(Params^[1])^);
end;
procedure Lape_Wait(const Params: PParamArray);
begin
ps_Wait(PDWord(Params^[0])^);
end;

View File

@ -95,7 +95,6 @@ AddGlobalFunc('function ConvoluteBitmap(bitmap: integer; matrix: T2DExtendedArra
AddGlobalFunc('function CalculatePixelShift(Bmp1,Bmp2: Integer; CompareBox: TBox): integer', @Lape_CalculatePixelShift);
AddGlobalFunc('function CalculatePixelTolerance(Bmp1,Bmp2: Integer; CompareBox: TBox; CTS: integer): extended', @Lape_CalculatePixelTolerance);
{ Math }
AddGlobalFunc('function round(e: extended): integer', @Lape_round);
@ -121,6 +120,43 @@ AddGlobalFunc('function ArcTan2(y,x: extended): extended', @Lape_ArcTan2);
AddGlobalFunc('procedure IncEx(var x: integer; increase: integer);', @Lape_IncEx);
AddGlobalFunc('procedure DecEx(var x: integer; Decrease: integer);', @Lape_DecEx);
AddGlobalFunc('function Factorial(number: longword): Int64', @Lape_Factorial);
AddGlobalFunc('function BinCoe(a, b: LongInt): Extended', @Lape_BinCoe);
AddGlobalFunc('function FixD(Degrees: extended): Extended', @Lape_FixD);
AddGlobalFunc('function InRange(const value,min,max: integer): boolean', @Lape_InRange);
AddGlobalFunc('function IntToBox(x1,y1,x2,y2: integer): TBox', @Lape_IntToBox);
AddGlobalFunc('function IntInBox(x, y: Integer; Box: TBox): Boolean', @Lape_IntInBox);
AddGlobalFunc('function PointToBox(PT1,PT2: TPoint): TBox', @Lape_PointToBox);
AddGlobalFunc('function PointInBox(PT: TPoint; Box: TBox): Boolean', @Lape_PointInBox);
AddGlobalFunc('function floor(e: extended): integer', @Lape_floor);
AddGlobalFunc('function logn(base, x: extended): extended', @Lape_logn);
AddGlobalFunc('function ln(x: extended): extended', @Lape_ln);
AddGlobalFunc('function inttohex(value: integer): string', @Lape_inttohex);
AddGlobalFunc('function hextoint(hex: string): integer', @Lape_hextoint);
AddGlobalFunc('function sar(AValue: longint; shift: byte): longint', @Lape_sar);
AddGlobalFunc('function ror(num: longword; shift: byte): LongWord', @Lape_ror);
AddGlobalFunc('function rol(num: longword; shift: byte): LongWord', @Lape_rol);
AddGlobalFunc('function tan(e: extended): extended', @Lape_tan);
AddGlobalFunc('function radians(e: extended): extended', @Lape_radians);
AddGlobalFunc('function degrees(e: extended): extended', @Lape_degrees);
AddGlobalFunc('function ArcSin(e: extended): extended', @Lape_ArcSin);
AddGlobalFunc('function ArcCos(e: extended): extended', @Lape_ArcCos);
AddGlobalFunc('function ArcTan(e: extended): extended', @Lape_ArcTan);
AddGlobalFunc('function Cotan(e: extended): extended', @Lape_Cotan);
AddGlobalFunc('function Secant(e: extended): extended', @Lape_Secant);
AddGlobalFunc('function Cosecant(e: extended): extended', @Lape_Cosecant);
AddGlobalFunc('function Cot(e: extended): extended', @Lape_Cot);
AddGlobalFunc('function Sec(e: extended): extended', @Lape_Sec);
AddGlobalFunc('function Csc(e: extended): extended', @Lape_Csc);
AddGlobalFunc('function Cosh(e: extended): extended', @Lape_Cosh);
AddGlobalFunc('function Sinh(e: extended): extended', @Lape_Sinh);
AddGlobalFunc('function Tanh(e: extended): extended', @Lape_Tanh);
AddGlobalFunc('function CotH(e: extended): extended', @Lape_CotH);
AddGlobalFunc('function SecH(e: extended): extended', @Lape_SecH);
AddGlobalFunc('function CscH(e: extended): extended', @Lape_CscH);
AddGlobalFunc('function ArcCosh(e: extended): extended', @Lape_ArcCosh);
AddGlobalFunc('function ArcSinh(e: extended): extended', @Lape_ArcSinh);
AddGlobalFunc('function DecRet(e: Extended): Extended', @Lape_DecRet);
AddGlobalFunc('function log10(f: Extended): Extended', @Lape_log10);
{ Color }
@ -149,46 +185,28 @@ AddGlobalFunc('function FindColoredAreaTolerance(var x, y: Integer; Color, xs, y
{ Color Conversions }
AddGlobalFunc('procedure ColorToRGB(Color: integer; var r, g, b: Integer);', @Lape_ColorToRGB);
//ps_RGBToColor
//ps_ColorToHSL
//ps_HSLToColor
//ps_ColorToXYZ
//ps_XYZToColor
//ps_RGBToHSL
//ps_HSLToRGB
//ps_RGBToXYZ
//ps_XYZToRGB
AddGlobalFunc('function RGBtoColor(r, g, b: Integer): TColor', @Lape_RGBtoColor);
AddGlobalFunc('procedure ColorToHSL(Color: Integer; var h, s, l: Extended);', @Lape_ColorToHSL);
AddGlobalFunc('function HSLToColor(H, S, L: Extended): TColor', @Lape_HSLToColor);
AddGlobalFunc('procedure ColorToXYZ(Color: Integer; var x, y, z: Extended);', @Lape_ColorToXYZ);
AddGlobalFunc('function XYZToColor(X, Y, Z: Extended): TColor', @Lape_XYZToColor);
AddGlobalFunc('procedure RGBToHSL(R, G, B: Integer; var h, s, l: Extended);', @Lape_RGBToHSL);
AddGlobalFunc('procedure HSLtoRGB(H, S, L: extended; var R, G,B: Integer);', @Lape_HSLtoRGB);
AddGlobalFunc('procedure RGBToXYZ(R, G, B: Integer; var x, y,z: Extended);', @Lape_RGBToXYZ);
AddGlobalFunc('procedure XYZToRGB(X, Y, Z: Extended; var R, G, B: Integer);', @Lape_XYZToRGB);
{ Crypto }
AddGlobalFunc('function haval(Data: string): string', @Lape_haval);
//ps_md4
//ps_md5
//ps_ripemd128
//ps_ripemd160
//ps_sha1
//ps_sha256
//ps_sha384
//ps_sha512
//ps_tiger
(* File isn't included!
AddGlobalFunc('function ext_UnTar(const Input: string; var Content: TStringArray): boolean', @Lape_ext_UnTar);
AddGlobalFunc('function ext_UnTarEx(const Input: string; const outputdir: string; overwrite: boolean): boolean', @Lape_ext_UnTarEx);
AddGlobalFunc('function ext_DecompressBZip2(const input: string; var output: string; const BlockSize: Cardinal): boolean', @Lape_ext_DecompressBZip2);
AddGlobalFunc('function ext_GetPage(const url: string): string', @Lape_ext_GetPage);
//AddGlobalFunc('function ext_MessageDlg(const aCaption, aMsg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer', @Lape_ext_MessageDlg);
//AddGlobalFunc('function ext_SDTMToMDTM(Const DTM: TSDTM): TMDTM', @Lape_ext_SDTMToMDTM);
AddGlobalFunc('function ext_InputQuery(const ACaption, APrompt: String; var Value: String): Boolean', @Lape_ext_InputQuery);
AddGlobalFunc('function ext_ScriptText: string', @Lape_ext_ScriptText);
AddGlobalFunc('function ext_GetSelectedText: string', @Lape_ext_GetSelectedText);
AddGlobalFunc('procedure ext_OpenScript(vName, Data: string; Run: boolean);', @Lape_ext_OpenScript);
AddGlobalFunc('procedure ext_OpenScriptEx(FileName: string; Run: boolean);', @Lape_ext_OpenScriptEx);
AddGlobalFunc('function ext_GetPageEx(const URL, PostData, MimeType: string): string', @Lape_ext_GetPageEx);
AddGlobalFunc('function ext_GetJSONValue(const Data, Value: string): string', @Lape_ext_GetJSONValue);
*)
AddGlobalFunc('function md4(Data: string): string', @Lape_md4);
AddGlobalFunc('function md5(Data: string): string', @Lape_md5);
AddGlobalFunc('function ripemd128(Data: string): string', @Lape_ripemd128);
AddGlobalFunc('function ripemd160(Data: string): string', @Lape_ripemd160);
AddGlobalFunc('function sha1(Data: string): string', @Lape_sha1);
AddGlobalFunc('function sha256(Data: string): string', @Lape_sha256);
AddGlobalFunc('function sha384(Data: string): string', @Lape_sha384);
AddGlobalFunc('function sha512(Data: string): string', @Lape_sha512);
AddGlobalFunc('function tiger(Data: string): string', @Lape_tiger);
{ Files }
@ -210,8 +228,11 @@ AddGlobalFunc('function ForceDirectores(const dir: string): boolean', @Lape_Forc
AddGlobalFunc('function GetFiles(const Path, Ext: string): TStringArray', @Lape_GetFiles);
AddGlobalFunc('function GetDirectories(const path: string): TStringArray', @Lape_GetDirectories);
AddGlobalFunc('procedure WriteINI(const Section, KeyName, NewString, FileName: string);', @Lape_WriteINI);
AddGlobalFunc('function ReadINI(const Section, KeyName, FileName: string): string', @Lape_ReadINI);
AddGlobalFunc('procedure DeleteINI(const Section, KeyName, FileName: string);', @Lape_DeleteINI);
{ Web }
AddGlobalFunc('procedure OpenWebPage(const url: string);', @Lape_OpenWebPage);
AddGlobalFunc('function GetPage(const S: String): String', @Lape_GetPage);
AddGlobalFunc('function InitializeHTTPClient(HandleCookies: Boolean): Integer', @Lape_InitializeHTTPClient);
@ -226,6 +247,7 @@ AddGlobalFunc('function GetRawHeaders(Client: Integer): string', @Lape_GetRawHea
AddGlobalFunc('procedure SetProxy(Client: Integer; pHost, pPort: String);', @Lape_SetProxy);
{ Socket }
AddGlobalFunc('function RecvSocketStr(Client: integer): string', @Lape_RecvSocketStr);
AddGlobalFunc('function RecvSocket(Client: integer): string', @Lape_RecvSocket);
AddGlobalFunc('function RecvSocketEx(Client, Length: integer): string', @Lape_RecvSocketEx);
@ -252,6 +274,7 @@ AddGlobalFunc('procedure ClickMouse(x, y: integer; clickType: integer);', @Lape_
AddGlobalFunc('function IsMouseButtonDown(button: integer): boolean', @Lape_IsMouseButtonDown);
{ Keyboard }
AddGlobalFunc('procedure KeyDown(key: Word);', @Lape_KeyDown);
AddGlobalFunc('procedure KeyUp(key: Word);', @Lape_KeyUp);
AddGlobalFunc('procedure SendKeys(const s: string);', @Lape_SendKeys);
@ -265,14 +288,15 @@ AddGlobalFunc('function rs_GetUpText: String', @Lape_rs_GetUpText);
AddGlobalFunc('function rs_GetUpTextAtEx(x, y: integer; shadow: boolean): string', @Lape_rs_GetUpTextAtEx);
AddGlobalFunc('function rs_GetUpTextAt(x, y: integer): string', @Lape_rs_GetUpTextAt);
AddGlobalFunc('function BitmapFromText(const text, font: String): integer', @Lape_BitmapFromText);
// ps_TPAFromText?
// ps_MaskFromText?
// ps_GetTextAt
// ps_GetTextAtEx
// ps_GetTextATPA
// ps_LoadSystemFont
// ps_LoadFont
// ps_FreeFont
AddGlobalFunc('function MaskFromText(const text, font: String): TMask', @Lape_MaskFromText);
AddGlobalFunc('procedure TPAFromTextWrap(const text, font: String; var w,h: integer; out TPA: TPointArray);', @Lape_TPAFromTextWrap);
AddGlobalFunc('function TPAFromText(const text, font: String; var w,h: integer): TPointArray', @Lape_TPAFromText);
AddGlobalFunc('function GetTextATPA(const ATPA: T2DPointArray; const maxvspacing: integer; const font: string): string', @Lape_GetTextATPA);
AddGlobalFunc('function GetTextAt(const atX, atY, minvspacing, maxvspacing, hspacing, color, tol, len: integer; const font: string): string', @Lape_GetTextAt);
AddGlobalFunc('function GetTextAtEx(const xs,ys,xe,ye, minvspacing, maxvspacing, hspacing, color, tol: integer; const font: string): string', @Lape_GetTextAtEx);
//AddGlobalFunc('function LoadSystemFont(const SysFont: TFont; const FontName: string): boolean', @Lape_LoadSystemFont);
AddGlobalFunc('function LoadFont(const FontName: string; shadow: boolean): boolean', @Lape_LoadFont);
AddGlobalFunc('function FreeFont(const FontName: string): boolean', @Lape_FreeFont);
{ Other }
@ -281,7 +305,42 @@ AddGlobalFunc('function SetScriptProp(prop: TSP_Property; Value: TVariantArray):
AddGlobalFunc('function GetScriptProp(prop: TSP_Property; var Value: TVariantArray): boolean', @Lape_GetScriptProp);
AddGlobalFunc('procedure Wait(t: DWord);', @Lape_Wait);
AddGlobalFunc('procedure PlaySound(Sound: string);', @Lape_PlaySound);
AddGlobalFunc('Procedure StopSound;', @Lape_StopSound);
AddGlobalFunc('procedure ClearDebug;', @Lape_ClearDebug);
AddGlobalFunc('procedure SetSupressExceptions(Supress: boolean);', @Lape_SetSupressExceptions);
AddGlobalFunc('procedure SaveScreenshot(FileName: string);', @Lape_SaveScreenshot);
AddGlobalFunc('procedure DisplayDebugImgWindow(w,h: integer);', @Lape_DisplayDebugImgWindow);
AddGlobalFunc('procedure DrawBitmapDebugImg(bmp: integer);', @Lape_DrawBitmapDebugImg);
AddGlobalFunc('function GetDebugBitmap: integer', @Lape_GetDebugBitmap);
AddGlobalFunc('procedure ClearDebugImg;', @Lape_ClearDebugImg);
AddGlobalFunc('procedure Status(Status: string);', @Lape_Status);
AddGlobalFunc('procedure Disguise(Caption: string);', @Lape_Disguise);
AddGlobalFunc('procedure ShowMessage(msg: string);', @Lape_ShowMessage);
AddGlobalFunc('function MessageBox(Text, Caption: string; Flags: LongInt): Integer', @Lape_MessageBox);
//AddGlobalFunc('function MessageDlg(const Caption, Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): integer', @Lape_MessageDlg);
AddGlobalFunc('function InputQuery(const ACaption, APrompt: String; var Value: String): Boolean', @Lape_InputQuery);
AddGlobalFunc('procedure TerminateScript;', @Lape_TerminateScript);
AddGlobalFunc('function GetTimeRunning: LongWord', @Lape_GetTimeRunning);
//AddGlobalFunc('function GetTClient: TClient', @Lape_GetTClient);
AddGlobalFunc('procedure ConvertTime(Time: integer; var h,m,s: integer);', @Lape_ConvertTime);
AddGlobalFunc('procedure DecodeDate(const SourceDate: TDateTime; var Year, Month, Day: Word);', @Lape_DecodeDate);
AddGlobalFunc('procedure DecodeTime(DateTime: TDateTime; var Hour,Min,Sec,MSec: word);', @Lape_DecodeTime);
AddGlobalFunc('function Now: TDateTime', @Lape_Now);
AddGlobalFunc('function Date: TDateTime', @Lape_Date);
AddGlobalFunc('function GetTickCount: Longword', @Lape_GetTickCount);
AddGlobalFunc('procedure HakunaMatata;', @Lape_HakunaMatata);
AddGlobalFunc('procedure Simba;', @Lape_Simba);
AddGlobalFunc('procedure SetClipBoard(const Data: string);', @Lape_SetClipBoard);
AddGlobalFunc('function GetClipBoard: string', @Lape_GetClipBoard);
//AddGlobalFunc('function GetProcesses: TSysProcArr', @Lape_GetProcesses);
//AddGlobalFunc('procedure SetTarget(Proc: TSysProc);', @Lape_SetTarget);
AddGlobalFunc('function ExtractFileExt(const FileName: string): string', @Lape_ExtractFileExt);
{ Settings }
AddGlobalFunc('function SetSettingValue(const KeyName,value: string): boolean', @Lape_SetSettingValue);
AddGlobalFunc('function KeyIsSetting(const KeyName: String): Boolean', @Lape_KeyIsSetting);
AddGlobalFunc('function KeyIsDirectory(const KeyName: String): Boolean', @Lape_KeyIsDirectory);
@ -292,6 +351,7 @@ AddGlobalFunc('function DeleteSetting(const KeyName: String): Boolean', @Lape_De
AddGlobalFunc('function DeleteSubSettings(const KeyName: String): Boolean', @Lape_DeleteSubSettings);
{ String }
AddGlobalFunc('function Capitalize(str: string): string', @Lape_Capitalize);
AddGlobalFunc('function CompressString(const Str: string): string', @Lape_CompressString);
AddGlobalFunc('function DecompressString(const Compressed: string): string', @Lape_DecompressString);
@ -309,8 +369,19 @@ AddGlobalFunc('function StrToFloatDef(value: String; default: Extended): Extende
AddGlobalFunc('function StrToBool(value: String): Boolean', @Lape_StrToBool);
AddGlobalFunc('function StrToBoolDef(value: String; default: Boolean): Boolean', @Lape_StrToBoolDef);
AddGlobalFunc('function Between(s1, s2, str: string): string', @Lape_Between);
AddGlobalFunc('function Implode(Glue: string; Pieces: TStringArray): string', @Lape_Implode);
AddGlobalFunc('function Explode(del, str: string): TStringArray', @Lape_Explode);
AddGlobalFunc('procedure ExplodeWrap(del, str: string; var res: TStringArray);', @Lape_ExplodeWrap);
AddGlobalFunc('function Padl(s: String; i: longInt): String', @Lape_Padl);
AddGlobalFunc('function Padz(s: String; i: longInt): String', @Lape_Padz);
AddGlobalFunc('function Padr(s: String; i: longInt): String', @Lape_Padr);
AddGlobalFunc('function ExecRegExpr(const RegExpr, InputStr: String): boolean', @Lape_ExecRegExpr);
//AddGlobalFunc('procedure SplitRegExpr(const RegExpr, InputStr: String; Pieces: TStrings);', @Lape_SplitRegExpr);
AddGlobalFunc('function ReplaceRegExpr(const RegExpr, InputStr, ReplaceStr: String; UseSubstitution: boolean): String', @Lape_ReplaceRegExpr);
AddGlobalFunc('function posex(needle, haystack: String; offset: integer): integer', @Lape_posex);
{ TPA }
AddGlobalFunc('procedure Quicksort(var Arr: TIntegerArray);', @Lape_Quicksort);
AddGlobalFunc('procedure tSwap(var a, b: TPoint);', @Lape_tSwap);
AddGlobalFunc('procedure tpaSwap(var a, b: TPointArray);', @Lape_tpaSwap);
@ -416,3 +487,19 @@ AddGlobalFunc('function Freeze: boolean', @Lape_Freeze);
AddGlobalFunc('function Unfreeze: boolean', @Lape_Unfreeze);
AddGlobalFunc('procedure ActivateClient;', @Lape_ActivateClient);
AddGlobalFunc('function IsTargetValid: boolean', @Lape_IsTargetValid);
{ Extensions }
//AddGlobalFunc('function ext_UnTar(const Input: string; var Content: TStringArray): boolean', @Lape_ext_UnTar);
//AddGlobalFunc('function ext_UnTarEx(const Input: string; const outputdir: string; overwrite: boolean): boolean', @Lape_ext_UnTarEx);
//AddGlobalFunc('function ext_DecompressBZip2(const input: string; var output: string; const BlockSize: Cardinal): boolean', @Lape_ext_DecompressBZip2);
//AddGlobalFunc('function ext_GetPage(const url: string): string', @Lape_ext_GetPage);
////AddGlobalFunc('function ext_MessageDlg(const aCaption, aMsg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer', @Lape_ext_MessageDlg);
////AddGlobalFunc('function ext_SDTMToMDTM(Const DTM: TSDTM): TMDTM', @Lape_ext_SDTMToMDTM);
//AddGlobalFunc('function ext_InputQuery(const ACaption, APrompt: String; var Value: String): Boolean', @Lape_ext_InputQuery);
//AddGlobalFunc('function ext_ScriptText: string', @Lape_ext_ScriptText);
//AddGlobalFunc('function ext_GetSelectedText: string', @Lape_ext_GetSelectedText);
//AddGlobalFunc('procedure ext_OpenScript(vName, Data: string; Run: boolean);', @Lape_ext_OpenScript);
//AddGlobalFunc('procedure ext_OpenScriptEx(FileName: string; Run: boolean);', @Lape_ext_OpenScriptEx);
//AddGlobalFunc('function ext_GetPageEx(const URL, PostData, MimeType: string): string', @Lape_ext_GetPageEx);
//AddGlobalFunc('function ext_GetJSONValue(const Data, Value: string): string', @Lape_ext_GetJSONValue);

View File

@ -1281,23 +1281,23 @@ type
end;
{$I LPInc/Wrappers/other.inc}
{$I LPInc/Wrappers/settings.inc}
{$I LPInc/Wrappers/bitmap.inc}
{$I LPInc/Wrappers/window.inc}
{$I LPInc/Wrappers/tpa.inc}
{$I LPInc/Wrappers/strings.inc}
{$I LPInc/Wrappers/colour.inc}
{$I LPInc/Wrappers/colourconv.inc}
{$I LPInc/Wrappers/crypto.inc}
{$I LPInc/Wrappers/math.inc}
{$I LPInc/Wrappers/mouse.inc}
{$I LPInc/Wrappers/file.inc}
{$I LPInc/Wrappers/keyboard.inc}
{$I LPInc/Wrappers/dtm.inc}
{$I LPInc/Wrappers/lp_other.inc}
{$I LPInc/Wrappers/lp_settings.inc}
{$I LPInc/Wrappers/lp_bitmap.inc}
{$I LPInc/Wrappers/lp_window.inc}
{$I LPInc/Wrappers/lp_tpa.inc}
{$I LPInc/Wrappers/lp_strings.inc}
{$I LPInc/Wrappers/lp_colour.inc}
{$I LPInc/Wrappers/lp_colourconv.inc}
{$I LPInc/Wrappers/lp_crypto.inc}
{$I LPInc/Wrappers/lp_math.inc}
{$I LPInc/Wrappers/lp_mouse.inc}
{$I LPInc/Wrappers/lp_file.inc}
{$I LPInc/Wrappers/lp_keyboard.inc}
{$I LPInc/Wrappers/lp_dtm.inc}
{.$I LPInc/Wrappers/extensions.inc} //Doesn't work for me!
{$I LPInc/Wrappers/ocr.inc}
{$I LPInc/Wrappers/internets.inc}
{$I LPInc/Wrappers/lp_ocr.inc}
{$I LPInc/Wrappers/lp_internets.inc}
constructor TLPThread.Create(CreateSuspended: Boolean; TheSyncInfo: PSyncInfo; plugin_dir: string);
var