// Account 1
function OnEntry(var X: Integer): Boolean;
begin
  print('Call from another script, increase X');
  inc(X);
  Result:= True;
end;

begin
  Delay(-1);
end.


// Account 2
var
  X: Integer;
  Obj: TBot;

begin
  if BotList.ByName('Account name 1', Obj) then begin   // if found account
    X:= 5;                    // assign an initial value of X
    Print(Obj.UserName);      // print his name
    Obj.Control.Entry(X);     // call the OnEntry event on account 1
    Print(X);                 // print the new value of X
  end; 
end.