AddGlobalFunc('function ps_CreateBitmapString(bmp: integer): string', @Lape_CreateBitmapString); AddGlobalFunc('function ps_GetMufasaBitmap(bmp: integer): TMufasaBitmap', @Lape_GetMufasaBitmap); AddGlobalFunc('function ps_CreateBitmap(w,h: integer): integer', @Lape_CreateBitmap); AddGlobalFunc('procedure ps_FreeBitmap(Number: integer);', @Lape_FreeBitmap); AddGlobalFunc('procedure ps_SaveBitmap(Bmp: integer; path: string);', @Lape_SaveBitmap); AddGlobalFunc('function ps_BitmapFromString(Width,height: integer; Data: string): integer', @Lape_BitmapFromString); AddGlobalFunc('function ps_LoadBitmap(Path: String): integer', @Lape_LoadBitmap); AddGlobalFunc('procedure ps_SetBitmapSize(Bmp,NewW,NewH: integer);', @Lape_SetBitmapSize); AddGlobalFunc('procedure ps_StretchBitmapResize(Bmp,NewW,NewH: integer);', @Lape_StretchBitmapResize); AddGlobalFunc('procedure ps_GetBitmapSize(Bmp: integer; var BmpW,BmpH: integer);', @Lape_GetBitmapSize); AddGlobalFunc('procedure ps_SetBitmapName(Bmp: integer; name: string);', @Lape_SetBitmapName); AddGlobalFunc('function ps_CreateMirroredBitmap(Bmp: integer): integer', @Lape_CreateMirroredBitmap); AddGlobalFunc('function ps_CreateMirroredBitmapEx(Bmp: integer; MirrorStyle: TBmpMirrorStyle): integer', @Lape_CreateMirroredBitmapEx); AddGlobalFunc('function ps_FastGetPixel(bmp,x,y: integer): LongWord', @Lape_FastGetPixel); AddGlobalFunc('function ps_FastGetPixels(bmp: integer; TPA: TPointArray): TIntegerArray', @Lape_FastGetPixels); AddGlobalFunc('function ps_GetBitmapAreaColors(bmp,xs, ys, xe, ye: Integer): T2DIntArray', @Lape_GetBitmapAreaColors); AddGlobalFunc('procedure ps_FastSetPixel(Bmp,x,y: integer; Color: TColor);', @Lape_FastSetPixel); AddGlobalFunc('procedure ps_FastSetPixels(Bmp: integer; TPA: TPointArray; Colors: TIntegerArray);', @Lape_FastSetPixels); AddGlobalFunc('procedure ps_DrawTPABitmap(bitmap: integer; TPA: TPointArray; Color: integer);', @Lape_DrawTPABitmap); AddGlobalFunc('procedure ps_DrawATPABitmap(bitmap: integer; ATPA: T2DPointArray);', @Lape_DrawATPABitmap); AddGlobalFunc('procedure ps_DrawATPABitmapEx(bitmap: integer; ATPA: T2DPointArray; Colors: TIntegerArray);', @Lape_DrawATPABitmapEx); AddGlobalFunc('procedure ps_FastDrawClear(bmp: integer; Color: TColor);', @Lape_FastDrawClear); AddGlobalFunc('procedure ps_DrawBitmap(Bmp: Integer; Dest: TCanvas; x, y: Integer);', @Lape_DrawBitmap); AddGlobalFunc('procedure ps_FastDrawTransparent(x, y: Integer; SourceBitmap, TargetBitmap: Integer);', @Lape_FastDrawTransparent); AddGlobalFunc('procedure ps_SetTransparentColor(Bmp: integer; Color: TColor);', @Lape_SetTransparentColor); AddGlobalFunc('function ps_GetTransparentColor(Bmp: integer): TColor', @Lape_GetTransparentColor); AddGlobalFunc('procedure ps_FastReplaceColor(bmp: Integer; OldColor, NewColor: TColor);', @Lape_FastReplaceColor); AddGlobalFunc('procedure ps_CopyClientToBitmap(bmp, xs, ys, xe, ye: Integer);', @Lape_CopyClientToBitmap); AddGlobalFunc('function ps_BitmapFromClient(const xs, ys, xe, ye: Integer): Integer', @Lape_BitmapFromClient); AddGlobalFunc('function ps_FindBitmap(Bitmap: integer; var x, y: Integer): Boolean', @Lape_FindBitmap); AddGlobalFunc('function ps_FindBitmapIn(bitmap: integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean', @Lape_FindBitmapIn); AddGlobalFunc('function ps_FindBitmapToleranceIn(bitmap: integer; var x, y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer): Boolean', @Lape_FindBitmapToleranceIn); AddGlobalFunc('function ps_FindBitmapSpiral(bitmap: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean', @Lape_FindBitmapSpiral); AddGlobalFunc('function ps_FindBitmapsSpiralTolerance(bitmap: integer; x, y: Integer; var Points: TPointArray; xs, ys, xe, ye,tolerance: Integer): Boolean', @Lape_FindBitmapsSpiralTolerance); AddGlobalFunc('function ps_FindBitmapSpiralTolerance(bitmap: integer; var x, y: Integer; xs, ys, xe, ye,tolerance: integer): Boolean', @Lape_FindBitmapSpiralTolerance); AddGlobalFunc('function ps_RotateBitmap(bitmap: Integer; angle: Extended): Integer', @Lape_RotateBitmap); AddGlobalFunc('function ps_Desaturate(Bitmap: integer): integer', @Lape_Desaturate); AddGlobalFunc('procedure ps_InvertBitmap(Bitmap: integer);', @Lape_InvertBitmap); AddGlobalFunc('function ps_CopyBitmap(Bitmap: integer): integer', @Lape_CopyBitmap); AddGlobalFunc('function ps_GreyScaleBitmap(Bitmap: integer): integer', @Lape_GreyScaleBitmap); AddGlobalFunc('function ps_BrightnessBitmap(Bitmap,br: integer): integer', @Lape_BrightnessBitmap); AddGlobalFunc('function ps_ContrastBitmap(bitmap: integer; co: extended): integer', @Lape_ContrastBitmap); AddGlobalFunc('function ps_PosterizeBitmap(Bitmap: integer; po: integer): integer', @Lape_PosterizeBitmap); AddGlobalFunc('function ps_CreateMaskFromBitmap(Bitmap: integer): TMask', @Lape_CreateMaskFromBitmap); AddGlobalFunc('function ps_FindMaskTolerance(const mask: TMask; var x, y: Integer; xs,ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean', @Lape_FindMaskTolerance); AddGlobalFunc('function ps_FindBitmapMaskTolerance(mask: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean', @Lape_FindBitmapMaskTolerance); AddGlobalFunc('function ps_FindDeformedBitmapToleranceIn(bitmap: integer; var x, y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer; Range: Integer; AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean', @Lape_FindDeformedBitmapToleranceIn); AddGlobalFunc('procedure ps_RectangleBitmap(bitmap: integer; const box: TBox; Color: TColor);', @Lape_RectangleBitmap); AddGlobalFunc('procedure ps_FloodFillBitmap(bitmap: integer; const StartPoint: TPoint; const SearchCol,ReplaceCol: TColor);', @Lape_FloodFillBitmap); AddGlobalFunc('function ps_ConvoluteBitmap(bitmap: integer; matrix: T2DExtendedArray): integer', @Lape_ConvoluteBitmap); AddGlobalFunc('function ps_CalculatePixelShift(Bmp1,Bmp2: Integer; CompareBox: TBox): integer', @Lape_CalculatePixelShift); AddGlobalFunc('function ps_CalculatePixelTolerance(Bmp1,Bmp2: Integer; CompareBox: TBox; CTS: integer): extended', @Lape_CalculatePixelTolerance); AddGlobalFunc('function ps_GetColor(x,y: integer): TColor', @Lape_GetColor); AddGlobalFunc('procedure ps_GetColorsWrap(Coords: TPointArray; var Colors: TIntegerArray);', @Lape_GetColorsWrap); AddGlobalFunc('function ps_GetColors(const Coords: TPointArray): TIntegerArray', @Lape_GetColors); AddGlobalFunc('function ps_findcolor(var x, y: integer; color, x1, y1, x2, y2: integer): boolean', @Lape_findcolor); AddGlobalFunc('function ps_findcolortoleranceOptimised(var x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean', @Lape_findcolortoleranceOptimised); AddGlobalFunc('function ps_findcolortolerance(var x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean', @Lape_findcolortolerance); AddGlobalFunc('function ps_FindColors(var TPA: TPointArray; Color, x1, y1, x2, y2: Integer): Boolean', @Lape_FindColors); AddGlobalFunc('procedure ps_SetColorToleranceSpeed(cts: Integer);', @Lape_SetColorToleranceSpeed); AddGlobalFunc('function ps_GetToleranceSpeed: Integer', @Lape_GetToleranceSpeed); AddGlobalFunc('procedure ps_SetToleranceSpeed2Modifiers(nHue, nSat: Extended);', @Lape_SetToleranceSpeed2Modifiers); AddGlobalFunc('procedure ps_GetToleranceSpeed2Modifiers(var hMod, sMod: Extended);', @Lape_GetToleranceSpeed2Modifiers); AddGlobalFunc('function ps_SimilarColors(Col1,Col2,Tol: integer): boolean', @Lape_SimilarColors); AddGlobalFunc('function ps_CountColor(Color, xs, ys, xe, ye: Integer): Integer', @Lape_CountColor); AddGlobalFunc('function ps_CountColorTolerance(Color, xs, ys, xe, ye, Tolerance: Integer): Integer', @Lape_CountColorTolerance); AddGlobalFunc('function ps_FindColorsToleranceOptimised(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean', @Lape_FindColorsToleranceOptimised); AddGlobalFunc('function ps_FindColorsTolerance(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean', @Lape_FindColorsTolerance); AddGlobalFunc('function ps_FindColorSpiral(var x, y: Integer; color, xs, ys, xe, ye: Integer): Boolean', @Lape_FindColorSpiral); AddGlobalFunc('function ps_FindColorSpiralTolerance(var x, y: Integer; color, xs, ys, xe, ye,Tol: Integer): Boolean', @Lape_FindColorSpiralTolerance); AddGlobalFunc('function ps_FindColorsSpiralTolerance(x, y: Integer; var Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer): boolean', @Lape_FindColorsSpiralTolerance); AddGlobalFunc('function ps_FindColoredArea(var x, y: Integer; color, xs, ys, xe, ye: Integer; MinArea: Integer): Boolean', @Lape_FindColoredArea); AddGlobalFunc('function ps_FindColoredAreaTolerance(var x, y: Integer; Color, xs, ys, xe, ye, MinArea, tol: Integer): Boolean', @Lape_FindColoredAreaTolerance); AddGlobalFunc('procedure ps_ColorToRGB(Color: integer; var r, g, b: Integer);', @Lape_ColorToRGB); AddGlobalFunc('function ps_haval(Data: string): string', @Lape_haval); AddGlobalFunc('function ps_FindDTM(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean', @Lape_FindDTM); AddGlobalFunc('function ps_FindDTMs(DTM: Integer; var p: TPointArray; xs, ys, xe, ye: Integer): Boolean', @Lape_FindDTMs); AddGlobalFunc('function ps_FindDTMRotatedAlternating(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: Extended): Boolean', @Lape_FindDTMRotatedAlternating); AddGlobalFunc('function ps_FindDTMRotatedSE(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: Extended): Boolean', @Lape_FindDTMRotatedSE); AddGlobalFunc('function ps_FindDTMsRotatedAlternating(DTM: Integer; var Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: T2DExtendedArray): Boolean', @Lape_FindDTMsRotatedAlternating); AddGlobalFunc('function ps_FindDTMsRotatedSE(DTM: Integer; var Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: T2DExtendedArray): Boolean', @Lape_FindDTMsRotatedSE); AddGlobalFunc('procedure ps_SetDTMName(DTM: integer; const name: string);', @Lape_SetDTMName); AddGlobalFunc('function ps_DTMFromString(const DTMString: String): Integer', @Lape_DTMFromString); AddGlobalFunc('procedure ps_FreeDTM(DTM: Integer);', @Lape_FreeDTM); AddGlobalFunc('function ps_GetDTM(index: Integer): TMDTM', @Lape_GetDTM); AddGlobalFunc('function ps_AddTSDTM(const d: TSDTM): Integer', @Lape_AddTSDTM); AddGlobalFunc('function ps_AddDTM(const d: TMDTM): Integer', @Lape_AddDTM); AddGlobalFunc('procedure ps_PrintDTM(const aDTM: TMDTM);', @Lape_PrintDTM); AddGlobalFunc('function ps_MDTMToSDTM(Const DTM: TMDTM): TSDTM', @Lape_MDTMToSDTM); AddGlobalFunc('function ps_SDTMToMDTM(Const DTM: TSDTM): TMDTM', @Lape_SDTMToMDTM); AddGlobalFunc('function ps_CreateDTMPoint(x,y,c,t,asz: integer; bp: boolean): TMDTMPoint', @Lape_CreateDTMPoint); AddGlobalFunc('function ext_UnTar(const Input: string; var Content: TStringArray): boolean', @Lape_); AddGlobalFunc('function ext_UnTarEx(const Input: string; const outputdir: string; overwrite: boolean): boolean', @Lape_); AddGlobalFunc('function ext_DecompressBZip2(const input: string; var output: string; const BlockSize: Cardinal): boolean', @Lape_); AddGlobalFunc('function ext_GetPage(const url: string): string', @Lape_); AddGlobalFunc('function ext_MessageDlg(const aCaption, aMsg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer', @Lape_); AddGlobalFunc('function ext_SDTMToMDTM(Const DTM: TSDTM): TMDTM', @Lape_); AddGlobalFunc('function ext_InputQuery(const ACaption, APrompt: String; var Value: String): Boolean', @Lape_); AddGlobalFunc('function ext_ScriptText: string', @Lape_); AddGlobalFunc('function ext_GetSelectedText: string', @Lape_); AddGlobalFunc('procedure ext_OpenScript(vName, Data: string; Run: boolean);', @Lape_); AddGlobalFunc('procedure ext_OpenScriptEx(FileName: string; Run: boolean);', @Lape_); AddGlobalFunc('function ext_GetPageEx(const URL, PostData, MimeType: string): string', @Lape_); AddGlobalFunc('function ext_GetJSONValue(const Data, Value: string): string', @Lape_); AddGlobalFunc('function ps_CreateFile(const Path: string): Integer', @Lape_CreateFile); AddGlobalFunc('function ps_OpenFile(const Path: string; Shared: Boolean): Integer', @Lape_OpenFile); AddGlobalFunc('function ps_RewriteFile(const Path: string; Shared: Boolean): Integer', @Lape_RewriteFile); AddGlobalFunc('function ps_AppendFile(const Path: string): Integer', @Lape_AppendFile); AddGlobalFunc('procedure ps_CloseFile(FileNum: Integer);', @Lape_CloseFile); AddGlobalFunc('function ps_EndOfFile(FileNum: Integer): Boolean', @Lape_EndOfFile); AddGlobalFunc('function ps_FileSize(FileNum: Integer): LongInt', @Lape_FileSize); AddGlobalFunc('function ps_ReadFileString(FileNum: Integer; var s: string; x: Integer): Boolean', @Lape_ReadFileString); AddGlobalFunc('function ps_WriteFileString(FileNum: Integer; s: string): Boolean', @Lape_WriteFileString); AddGlobalFunc('function ps_SetFileCharPointer(FileNum, cChars, Origin: Integer): Integer', @Lape_SetFileCharPointer); AddGlobalFunc('function ps_FilePointerPos(FileNum: Integer): Integer', @Lape_FilePointerPos); AddGlobalFunc('function ps_FileExists(const FileName: string): Boolean', @Lape_FileExists); AddGlobalFunc('function ps_DirectoryExists(const DirectoryName: string): Boolean', @Lape_DirectoryExists); AddGlobalFunc('function ps_CreateDirectory(const DirectoryName: string): boolean', @Lape_CreateDirectory); AddGlobalFunc('function ps_ForceDirectores(const dir: string): boolean', @Lape_ForceDirectores); AddGlobalFunc('function ps_GetFiles(const Path, Ext: string): TStringArray', @Lape_GetFiles); AddGlobalFunc('function ps_GetDirectories(const path: string): TStringArray', @Lape_GetDirectories); AddGlobalFunc('procedure ps_WriteINI(const Section, KeyName, NewString, FileName: string);', @Lape_WriteINI); AddGlobalFunc('procedure ps_OpenWebPage(const url: string);', @Lape_OpenWebPage); AddGlobalFunc('function ps_GetPage(const S: String): String', @Lape_GetPage); AddGlobalFunc('function ps_InitializeHTTPClient(HandleCookies: Boolean): Integer', @Lape_InitializeHTTPClient); AddGlobalFunc('procedure ps_FreeHTTPClient(Client: Integer);', @Lape_FreeHTTPClient); AddGlobalFunc('function ps_GetHTTPPage(Client: Integer; const URL: string): string', @Lape_GetHTTPPage); AddGlobalFunc('procedure ps_SetHTTPUserAgent(Client: Integer; const Agent: string);', @Lape_SetHTTPUserAgent); AddGlobalFunc('function ps_PostHTTPPage(Client: Integer; const Url,PostData: string): string', @Lape_PostHTTPPage); AddGlobalFunc('function ps_PostHTTPPageEx(Client: Integer; const Url: string): string', @Lape_PostHTTPPageEx); AddGlobalFunc('procedure ps_ClearPostData(Client: Integer);', @Lape_ClearPostData); AddGlobalFunc('procedure ps_AddPostVariable(Client: Integer; const VarName, VarValue: string);', @Lape_AddPostVariable); AddGlobalFunc('function ps_GetRawHeaders(Client: Integer): string', @Lape_GetRawHeaders); AddGlobalFunc('procedure ps_SetProxy(Client: Integer; pHost, pPort: String);', @Lape_SetProxy); AddGlobalFunc('function ps_RecvSocketStr(Client: integer): string', @Lape_RecvSocketStr); AddGlobalFunc('function ps_RecvSocket(Client: integer): string', @Lape_RecvSocket); AddGlobalFunc('function ps_RecvSocketEx(Client, Length: integer): string', @Lape_RecvSocketEx); AddGlobalFunc('procedure ps_SendSocket(Client: integer; Data: string);', @Lape_SendSocket); AddGlobalFunc('procedure ps_ConnectSocket(Client: integer; IP, Port: string);', @Lape_ConnectSocket); AddGlobalFunc('procedure ps_CloseSocket(Client: integer);', @Lape_CloseSocket); AddGlobalFunc('procedure ps_SetSocketTimeout(Client, Time: integer);', @Lape_SetSocketTimeout); AddGlobalFunc('procedure ps_BindSocket(Client: integer; IP, Port: string);', @Lape_BindSocket); AddGlobalFunc('procedure ps_ListenSocket(Client: integer);', @Lape_ListenSocket); AddGlobalFunc('function ps_AcceptSocket(Client: integer): integer', @Lape_AcceptSocket); AddGlobalFunc('procedure ps_SocketInfo(Client: integer; out IP, Port: string);', @Lape_SocketInfo); AddGlobalFunc('function ps_CreateSocket: integer', @Lape_CreateSocket); AddGlobalFunc('procedure ps_FreeSocket(Client: integer);', @Lape_FreeSocket); AddGlobalFunc('procedure ps_KeyDown(key: Word);', @Lape_KeyDown); AddGlobalFunc('procedure ps_KeyUp(key: Word);', @Lape_KeyUp); AddGlobalFunc('procedure ps_SendKeys(const s: string);', @Lape_SendKeys); AddGlobalFunc('procedure ps_PressKey(key: Word);', @Lape_PressKey); AddGlobalFunc('function ps_isKeyDown(key: Word): boolean', @Lape_isKeyDown); AddGlobalFunc('function ps_GetKeyCode(c: char): integer', @Lape_GetKeyCode); AddGlobalFunc('function ps_round(e: extended): integer', @Lape_round); AddGlobalFunc('function ps_iAbs(a: integer): integer', @Lape_iAbs); AddGlobalFunc('function ps_ceil(e: extended): integer', @Lape_ceil); AddGlobalFunc('function ps_pow(base,exponent: extended): extended', @Lape_pow); AddGlobalFunc('function ps_RiemannGauss(Xstart,StepSize,Sigma: extended; AmountSteps: integer): extended', @Lape_RiemannGauss); AddGlobalFunc('function ps_DiscreteGauss(Xstart,Xend: integer; sigma: extended): TExtendedArray', @Lape_DiscreteGauss); AddGlobalFunc('function ps_GaussMatrix(N: integer; sigma: extended): T2DExtendedArray', @Lape_GaussMatrix); AddGlobalFunc('function ps_exp(exponent: extended): extended', @Lape_exp); AddGlobalFunc('function ps_Max(a,b: integer): integer', @Lape_Max); AddGlobalFunc('function ps_Min(a, b: Integer): Integer', @Lape_Min); AddGlobalFunc('function ps_MinE(a, b: extended): extended', @Lape_MinE); AddGlobalFunc('function ps_MaxE(a,b: extended): extended', @Lape_MaxE); AddGlobalFunc('function ps_Sqr(e: extended): extended', @Lape_Sqr); AddGlobalFunc('function ps_Point(x,y: integer): TPoint', @Lape_Point); AddGlobalFunc('function ps_Distance(x1,y1,x2,y2: integer): integer', @Lape_Distance); AddGlobalFunc('function ps_Hypot(X, Y: Extended): Extended', @Lape_Hypot); AddGlobalFunc('function ps_RandomRange(const aFrom, aTo: Integer): Integer', @Lape_RandomRange); AddGlobalFunc('function ps_Random(Int: integer): integer', @Lape_Random); AddGlobalFunc('function ps_RandomE: extended', @Lape_RandomE); AddGlobalFunc('function ps_ArcTan2(y,x: extended): extended', @Lape_ArcTan2); AddGlobalFunc('procedure ps_IncEx(var x: integer; increase: integer);', @Lape_IncEx); AddGlobalFunc('procedure ps_DecEx(var x: integer; Decrease: integer);', @Lape_DecEx); AddGlobalFunc('function ps_Factorial(number: longword): Int64', @Lape_Factorial); AddGlobalFunc('procedure ps_MoveMouse(x, y: integer);', @Lape_MoveMouse); AddGlobalFunc('procedure ps_ScrollMouse(x,y: integer; Clicks: integer);', @Lape_ScrollMouse); AddGlobalFunc('procedure ps_GetMousePos(var x, y: integer);', @Lape_GetMousePos); AddGlobalFunc('function ConvIntClickType(Int: Integer): TClickType', @Lape_); AddGlobalFunc('procedure ps_HoldMouse(x, y: integer; clickType: integer);', @Lape_HoldMouse); AddGlobalFunc('procedure ps_ReleaseMouse(x, y: integer; clickType: integer);', @Lape_ReleaseMouse); AddGlobalFunc('procedure ps_ClickMouse(x, y: integer; clickType: integer);', @Lape_ClickMouse); AddGlobalFunc('function ps_IsMouseButtonDown(button: integer): boolean', @Lape_IsMouseButtonDown); AddGlobalFunc('function ps_rs_GetUpText: String', @Lape_rs_GetUpText); AddGlobalFunc('function ps_rs_GetUpTextAtEx(x, y: integer; shadow: boolean): string', @Lape_rs_GetUpTextAtEx); AddGlobalFunc('function ps_rs_GetUpTextAt(x, y: integer): string', @Lape_rs_GetUpTextAt); AddGlobalFunc('function ps_BitmapFromText(const text, font: String): integer', @Lape_BitmapFromText); AddGlobalFunc('procedure ps_Writeln(const str: string);', @Lape_Writeln); AddGlobalFunc('function ps_SetScriptProp(prop: TSP_Property; Value: TVariantArray): boolean', @Lape_SetScriptProp); AddGlobalFunc('function ps_GetScriptProp(prop: TSP_Property; var Value: TVariantArray): boolean', @Lape_GetScriptProp); AddGlobalFunc('procedure ps_Wait(t: DWord);', @Lape_Wait); AddGlobalFunc('function ps_SetSettingValue(const KeyName,value: string): boolean', @Lape_SetSettingValue); AddGlobalFunc('function ps_KeyIsSetting(const KeyName: String): Boolean', @Lape_KeyIsSetting); AddGlobalFunc('function ps_KeyIsDirectory(const KeyName: String): Boolean', @Lape_KeyIsDirectory); AddGlobalFunc('function ps_GetSettingValue(const KeyName: String): String', @Lape_GetSettingValue); AddGlobalFunc('function ps_GetSettingValueDef(const KeyName, defVal: String): String', @Lape_GetSettingValueDef); AddGlobalFunc('function ps_ListSettings(const KeyName: String; var KeyReturn: TStringArray): boolean', @Lape_ListSettings); AddGlobalFunc('function ps_DeleteSetting(const KeyName: String): Boolean', @Lape_DeleteSetting); AddGlobalFunc('function ps_DeleteSubSettings(const KeyName: String): Boolean', @Lape_DeleteSubSettings); AddGlobalFunc('function ps_Capitalize(str: string): string', @Lape_Capitalize); AddGlobalFunc('function ps_CompressString(const Str: string): string', @Lape_CompressString); AddGlobalFunc('function ps_DecompressString(const Compressed: string): string', @Lape_DecompressString); AddGlobalFunc('function ps_Base64Encode(const str: string): string', @Lape_Base64Encode); AddGlobalFunc('function ps_Base64Decode(const str: string): string', @Lape_Base64Decode); AddGlobalFunc('function ps_ExtractFromStr(Str: string; Extract: StrExtr): string', @Lape_ExtractFromStr); AddGlobalFunc('function ps_BoolToStr(bool: boolean): string', @Lape_BoolToStr); AddGlobalFunc('function ps_Replace(Text, FindStr, ReplaceStr: string; Flags: TReplaceFlags): string', @Lape_Replace); AddGlobalFunc('function ps_IntToStr(int: integer): string', @Lape_IntToStr); AddGlobalFunc('function ps_FloatToStr(flt: extended): string', @Lape_FloatToStr); AddGlobalFunc('function ps_StrToInt(value: String): Integer', @Lape_StrToInt); AddGlobalFunc('function ps_StrToIntDef(value: String; default: Integer): Integer', @Lape_StrToIntDef); AddGlobalFunc('function ps_StrToFloat(value: String): Extended', @Lape_StrToFloat); AddGlobalFunc('function ps_StrToFloatDef(value: String; default: Extended): Extended', @Lape_StrToFloatDef); AddGlobalFunc('function ps_StrToBool(value: String): Boolean', @Lape_StrToBool); AddGlobalFunc('function ps_StrToBoolDef(value: String; default: Boolean): Boolean', @Lape_StrToBoolDef); AddGlobalFunc('function ps_Between(s1, s2, str: string): string', @Lape_Between); AddGlobalFunc('procedure ps_Quicksort(var Arr: TIntegerArray);', @Lape_Quicksort); AddGlobalFunc('procedure ps_tSwap(var a, b: TPoint);', @Lape_tSwap); AddGlobalFunc('procedure ps_tpaSwap(var a, b: TPointArray);', @Lape_tpaSwap); AddGlobalFunc('procedure ps_SwapE(var a, b: Extended);', @Lape_SwapE); AddGlobalFunc('procedure ps_RAaSTPAEx(var a: TPointArray; const w, h: Integer);', @Lape_RAaSTPAEx); AddGlobalFunc('procedure ps_RAaSTPA(var a: TPointArray; const Dist: Integer);', @Lape_RAaSTPA); AddGlobalFunc('function ps_NearbyPointInArrayEx(const P: TPoint; w, h: Integer; const a: TPointArray): Boolean', @Lape_NearbyPointInArrayEx); AddGlobalFunc('function ps_NearbyPointInArray(const P: TPoint; Dist: Integer; const a: TPointArray): Boolean', @Lape_NearbyPointInArray); AddGlobalFunc('procedure ps_QuickTPASort(var A: TIntegerArray; var B: TPointArray; iLo, iHi: Integer; SortUp: Boolean);', @Lape_QuickTPASort); AddGlobalFunc('procedure ps_QuickATPASort(var A: TIntegerArray; var B: T2DPointArray; iLo, iHi: Integer; SortUp: Boolean);', @Lape_QuickATPASort); AddGlobalFunc('procedure ps_SortTPAFrom(var a: TPointArray; const From: TPoint);', @Lape_SortTPAFrom); AddGlobalFunc('procedure ps_SortATPAFrom(var a: T2DPointArray; const From: TPoint);', @Lape_SortATPAFrom); AddGlobalFunc('procedure ps_SortATPAFromFirstPoint(var a: T2DPointArray; const From: TPoint);', @Lape_SortATPAFromFirstPoint); AddGlobalFunc('procedure ps_InvertTPA(var a: TPointArray);', @Lape_InvertTPA); AddGlobalFunc('procedure ps_InvertATPA(var a: T2DPointArray);', @Lape_InvertATPA); AddGlobalFunc('function ps_MiddleTPAEx(const TPA: TPointArray; var x, y: Integer): Boolean', @Lape_MiddleTPAEx); AddGlobalFunc('function ps_MiddleTPA(const tpa: TPointArray): TPoint', @Lape_MiddleTPA); AddGlobalFunc('procedure ps_SortATPASize(var a: T2DPointArray; const BigFirst: Boolean);', @Lape_SortATPASize); AddGlobalFunc('procedure ps_SortATPAFromSize(var a: T2DPointArray; const Size: Integer; CloseFirst: Boolean);', @Lape_SortATPAFromSize); AddGlobalFunc('function ps_InIntArrayEx(const a: TIntegerArray; var Where: Integer; const Number: Integer): Boolean', @Lape_InIntArrayEx); AddGlobalFunc('function ps_InIntArray(const a: TIntegerArray; Number: Integer): Boolean', @Lape_InIntArray); AddGlobalFunc('procedure ps_ClearSameIntegers(var a: TIntegerArray);', @Lape_ClearSameIntegers); AddGlobalFunc('procedure ps_ClearSameIntegersAndTPA(var a: TIntegerArray; var p: TPointArray);', @Lape_ClearSameIntegersAndTPA); AddGlobalFunc('function ps_SplitTPAEx(const arr: TPointArray; w, h: Integer): T2DPointArray', @Lape_SplitTPAEx); AddGlobalFunc('function ps_SplitTPA(const arr: TPointArray; Dist: Integer): T2DPointArray', @Lape_SplitTPA); AddGlobalFunc('function ps_FloodFillTPA(const TPA: TPointArray): T2DPointArray', @Lape_FloodFillTPA); AddGlobalFunc('procedure ps_FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);', @Lape_FilterPointsPie); AddGlobalFunc('procedure ps_FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);', @Lape_FilterPointsDist); AddGlobalFunc('procedure ps_FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);', @Lape_FilterPointsLine); AddGlobalFunc('procedure ps_FilterTPADist(var TPA: TPointArray; maxDist: integer);', @Lape_FilterTPADist); AddGlobalFunc('function ps_GetATPABounds(const ATPA: T2DPointArray): TBox', @Lape_GetATPABounds); AddGlobalFunc('function ps_GetTPABounds(const TPA: TPointArray): TBox', @Lape_GetTPABounds); AddGlobalFunc('function ps_FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean', @Lape_FindTPAinTPA); AddGlobalFunc('function ps_GetSamePointsATPA(const ATPA: T2DPointArray; var Matches: TPointArray): boolean', @Lape_GetSamePointsATPA); AddGlobalFunc('function ps_FindTextTPAinTPA(Height: integer; const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean', @Lape_FindTextTPAinTPA); AddGlobalFunc('procedure ps_SortCircleWise(var tpa: TPointArray; const cx, cy, StartDegree: Integer; SortUp, ClockWise: Boolean);', @Lape_SortCircleWise); AddGlobalFunc('procedure ps_LinearSort(var tpa: TPointArray; cx, cy, sd: Integer; SortUp: Boolean);', @Lape_LinearSort); AddGlobalFunc('function ps_RotatePoint(Const p: TPoint; angle, mx, my: Extended): TPoint', @Lape_RotatePoint); AddGlobalFunc('function ps_ChangeDistPT(const PT: TPoint; mx,my: integer; newdist: extended): TPoint', @Lape_ChangeDistPT); AddGlobalFunc('function ps_ChangeDistTPA(var TPA: TPointArray; mx,my: integer; newdist: extended): boolean', @Lape_ChangeDistTPA); AddGlobalFunc('function ps_FindGapsTPA(const TPA: TPointArray; MinPixels: Integer): T2DPointArray', @Lape_FindGapsTPA); AddGlobalFunc('function ps_RemoveDistTPointArray(x, y, dist: Integer; const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray', @Lape_RemoveDistTPointArray); AddGlobalFunc('function ps_CombineTPA(const Ar1, Ar2: TPointArray): TPointArray', @Lape_CombineTPA); AddGlobalFunc('function ps_ReArrangeandShortenArrayEx(const a: TPointArray; w, h: Integer): TPointArray', @Lape_ReArrangeandShortenArrayEx); AddGlobalFunc('function ps_ReArrangeandShortenArray(const a: TPointArray; Dist: Integer): TPointArray', @Lape_ReArrangeandShortenArray); AddGlobalFunc('function ps_TPAtoATPAEx(const TPA: TPointArray; w, h: Integer): T2DPointArray', @Lape_TPAtoATPAEx); AddGlobalFunc('function ps_TPAtoATPA(const TPA: TPointArray; Dist: Integer): T2DPointArray', @Lape_TPAtoATPA); AddGlobalFunc('function ps_CombineIntArray(const Ar1, Ar2: TIntegerArray): TIntegerArray', @Lape_CombineIntArray); AddGlobalFunc('function ps_MergeATPA(const ATPA: T2DPointArray): TPointArray', @Lape_MergeATPA); AddGlobalFunc('procedure ps_AppendTPA(var TPA: TPointArray; const ToAppend: TPointArray);', @Lape_AppendTPA); AddGlobalFunc('function ps_TPAFromBox(const Box: TBox): TPointArray', @Lape_TPAFromBox); AddGlobalFunc('function ps_RotatePoints(Const P: TPointArray; A, cx, cy: Extended): TPointArray', @Lape_RotatePoints); AddGlobalFunc('function ps_FindTPAEdges(const p: TPointArray): TPointArray', @Lape_FindTPAEdges); AddGlobalFunc('function ps_ClearTPAFromTPA(const arP, ClearPoints: TPointArray): TPointArray', @Lape_ClearTPAFromTPA); AddGlobalFunc('function ps_ReturnPointsNotInTPA(Const TotalTPA: TPointArray; const Box: TBox): TPointArray', @Lape_ReturnPointsNotInTPA); AddGlobalFunc('function ps_PointInTPA(p: TPoint; const arP: TPointArray): Boolean', @Lape_PointInTPA); AddGlobalFunc('procedure ps_ClearDoubleTPA(var TPA: TPointArray);', @Lape_ClearDoubleTPA); AddGlobalFunc('procedure ps_TPACountSort(Var TPA: TPointArray; const max: TPoint; Const SortOnX: Boolean);', @Lape_TPACountSort); AddGlobalFunc('procedure ps_TPACountSortBase(Var TPA: TPointArray; const maxx, base: TPoint; const SortOnX: Boolean);', @Lape_TPACountSortBase); AddGlobalFunc('procedure ps_InvertTIA(var tI: TIntegerArray);', @Lape_InvertTIA); AddGlobalFunc('function ps_SumIntegerArray(const Ints: TIntegerArray): Integer', @Lape_SumIntegerArray); AddGlobalFunc('function ps_AverageTIA(const tI: TIntegerArray): Integer', @Lape_AverageTIA); AddGlobalFunc('function ps_AverageExtended(const tE: TExtendedArray): Extended', @Lape_AverageExtended); AddGlobalFunc('procedure ps_SplitTPAExWrap(const arr: TPointArray; w, h: Integer; var res: T2DPointArray);', @Lape_SplitTPAExWrap); AddGlobalFunc('procedure ps_SplitTPAWrap(const arr: TPointArray; Dist: Integer; var res: T2DPointArray);', @Lape_SplitTPAWrap); AddGlobalFunc('procedure ps_FindGapsTPAWrap(const TPA: TPointArray; MinPixels: Integer; var Res: T2DPointArray);', @Lape_FindGapsTPAWrap); AddGlobalFunc('procedure ps_RemoveDistTPointArrayWrap(x, y, dist: Integer; const ThePoints: TPointArray; RemoveHigher: Boolean; var Res: TPointArray);', @Lape_RemoveDistTPointArrayWrap); AddGlobalFunc('procedure ps_CombineTPAWrap(const Ar1, Ar2: TPointArray; var Res: TPointArray);', @Lape_CombineTPAWrap); AddGlobalFunc('procedure ps_ReArrangeandShortenArrayExWrap(const a: TPointArray; w, h: Integer; var Res: TPointArray);', @Lape_ReArrangeandShortenArrayExWrap); AddGlobalFunc('procedure ps_ReArrangeandShortenArrayWrap(const a: TPointArray; Dist: Integer; var Res: TPointArray);', @Lape_ReArrangeandShortenArrayWrap); AddGlobalFunc('procedure ps_TPAtoATPAExWrap(const TPA: TPointArray; w, h: Integer; var Res: T2DPointArray);', @Lape_TPAtoATPAExWrap); AddGlobalFunc('procedure ps_TPAtoATPAWrap(const TPA: TPointArray; Dist: Integer; var Res: T2DPointArray);', @Lape_TPAtoATPAWrap); AddGlobalFunc('procedure ps_CombineIntArrayWrap(const Ar1, Ar2: TIntegerArray; var Res: TIntegerArray);', @Lape_CombineIntArrayWrap); AddGlobalFunc('procedure ps_MergeATPAWrap(const ATPA: T2DPointArray; var Res: TPointArray);', @Lape_MergeATPAWrap); AddGlobalFunc('procedure ps_TPAFromBoxWrap(const Box: TBox; var Res: TPointArray);', @Lape_TPAFromBoxWrap); AddGlobalFunc('procedure ps_RotatePointsWrap(Const P: TPointArray; A, cx, cy: Extended; var Res: TPointArray);', @Lape_RotatePointsWrap); AddGlobalFunc('procedure ps_FindTPAEdgesWrap(const p: TPointArray; var Res: TPointArray);', @Lape_FindTPAEdgesWrap); AddGlobalFunc('procedure ps_ClearTPAFromTPAWrap(const arP, ClearPoints: TPointArray; var Res: TPointArray);', @Lape_ClearTPAFromTPAWrap); AddGlobalFunc('procedure ps_ReturnPointsNotInTPAWrap(Const TotalTPA: TPointArray; const Box: TBox; var Res: TPointArray);', @Lape_ReturnPointsNotInTPAWrap); AddGlobalFunc('function ps_SameTPA(const aTPA, bTPA: TPointArray): Boolean', @Lape_SameTPA); AddGlobalFunc('function ps_TPAInATPA(const TPA: TPointArray; const InATPA: T2DPointArray; var Index: LongInt): Boolean', @Lape_TPAInATPA); AddGlobalFunc('procedure ps_OffsetTPA(var TPA: TPointArray; const Offset: TPoint);', @Lape_OffsetTPA); AddGlobalFunc('procedure ps_OffsetATPA(var ATPA: T2DPointArray; const Offset: TPoint);', @Lape_OffsetATPA); AddGlobalFunc('function ps_CopyTPA(const TPA: TPointArray): TPointArray', @Lape_CopyTPA); AddGlobalFunc('function ps_CopyATPA(const ATPA: T2DPointArray): T2DPointArray', @Lape_CopyATPA); AddGlobalFunc('procedure ps_SetDesktopAsClient;', @Lape_SetDesktopAsClient); AddGlobalFunc('function ps_SetTargetArray(P: Integer; w, h: integer): integer', @Lape_SetTargetArray); AddGlobalFunc('function ps_SetTargetBitmap(bitmap: Integer): integer', @Lape_SetTargetBitmap); AddGlobalFunc('function ps_SetEIOSTarget(name: string; args: Variant): integer', @Lape_SetEIOSTarget); AddGlobalFunc('procedure ps_SetImageTarget(idx: integer);', @Lape_SetImageTarget); AddGlobalFunc('procedure ps_SetKeyMouseTarget(idx: integer);', @Lape_SetKeyMouseTarget); AddGlobalFunc('function ps_GetImageTarget: integer', @Lape_GetImageTarget); AddGlobalFunc('function ps_GetKeyMouseTarget: integer', @Lape_GetKeyMouseTarget); AddGlobalFunc('function ps_ExportImageTarget: TTarget_Exported', @Lape_ExportImageTarget); AddGlobalFunc('function ps_ExportKeyMouseTarget: TTarget_Exported', @Lape_ExportKeyMouseTarget); AddGlobalFunc('procedure ps_FreeTarget(idx: integer);', @Lape_FreeTarget); AddGlobalFunc('procedure ps_GetClientDimensions(var w, h: integer);', @Lape_GetClientDimensions); AddGlobalFunc('procedure ps_GetClientPosition(var left, top: integer);', @Lape_GetClientPosition); AddGlobalFunc('function ps_Freeze: boolean', @Lape_Freeze); AddGlobalFunc('function ps_Unfreeze: boolean', @Lape_Unfreeze); AddGlobalFunc('procedure ps_ActivateClient;', @Lape_ActivateClient); AddGlobalFunc('function ps_IsTargetValid: boolean', @Lape_IsTargetValid);