Properties

Name Result Description Code Params Examples
Status TScriptStatus Script status
function Status: TScriptStatus;
There are no arguments You need to register to view the code example.
PaxFile String Path to script file
function PaxFile: string;
There are no arguments You need to register to view the code example.
Path String Path to script folder
function Path: string;
There are no arguments You need to register to view the code example.

Control functions

Name Result Description Code Params Examples
Run - Run script
procedure Run(Param: boolean);

Param - system parameter, doesn't affect anything

You need to register to view the code example.
Stop - Stop script
procedure Stop;
There are no arguments You need to register to view the code example.
Resume - Resume script and all threads
procedure Resume;
There are no arguments You need to register to view the code example.
Pause - Pause script
procedure Pause;
There are no arguments You need to register to view the code example.
Suspend - Suspend all threads except calling thread
procedure Suspend;
There are no arguments You need to register to view the code example.
Replace Boolean Restart current script or run new script. Run new script available only if current script is working.
function Replace(Path: string = ''): boolean;

Path - path to script file (по умолчанию - отсутствует)

You need to register to view the code example.
LoadScript - Load script on account. Loading available only if script is stopped on account.
procedure LoadScript(Bot: TObject; Path: string);

aBot - account where need to load script
Path - path to script file

You need to register to view the code example.
Lock - When working with global resources(variables) Strings / Lists / Arrays in several threads, use this method before accessing them (read/write), and unlock method after working with the global variable is completed. There should be no delay between Script.Lock / Script.Unlock.
procedure Lock;
There are no arguments You need to register to view the code example.
Unlock - Remove previously installed Lock
procedure UnLock;
There are no arguments You need to register to view the code example.

Additional functions

Name Result Description Code Params Examples
NewThread - Call procedure in new thread
procedure NewThread(Proc, Param: pointer);

Proc  - pointer to procedure
Param - pointer to variable

You need to register to view the code example.
MainProc - Call procedure in the main Adrenaline thread
procedure MainProc(Proc: Pointer);

Proc - pointer to procedure

You need to register to view the code example.
StartPlugin Boolean Run plugin from DLL
function StartPlugin(Path: string; Proc: pointer; Modal: boolean): boolean;

Path - path to plugin DLL

Proc - pointer to function/variables for scripts and plugin cooperation

Modal - is running in modal window

You need to register to view the code example.
OnPluginProc - Cooperate with plugin
procedure OnPluginProc(Param1: cardinal; Param2: WideString);

Param1 - 1st parameter

Param2 - 2nd parameter

You need to register to view the code example.

Objects

Имя Класс Description
Script TPaxEngine Account script

Methods

Имя Результат Description
TL2Control.GetScript Pointer на TPaxEngine Pointer to script of account of this controller. Can be transformed to TPaxEngine.