Misc¶
Miscellaneous methods that dont go in any other sections.
SimbaEnv¶
type
SimbaEnv = record
const SimbaPath = 'PathToSimbaDir';
const IncludesPath = 'PathToSimbaDir/Includes';
const PluginsPath = 'PathToSimbaDir/Plugins';
const ScriptsPath = 'PathToSimbaDir/Scripts';
const ScreenshotsPath = 'PathToSimbaDir/Screenshots';
const DataPath = 'PathToSimbaDir/Data';
const TempPath = 'PathToSimbaDir/Data/Temp';
end;
Record which contains constants to Simba environment paths.
Example:
WriteLn(SimbaEnv.ScriptsPath);
ClearSimbaOutput¶
procedure ClearSimbaOutput;
Clear the scripts output box in Simba.
SetSimbaSetting¶
function SetSimbaSetting(Name: String; DefValue: String = ''): String;
GetSimbaSetting¶
procedure GetSimbaSetting(Name, Value: String);
PlaySound¶
procedure PlaySound(Sound: String);
StopSound¶
procedure StopSound;
Simba¶
procedure Simba;
SetClipBoard¶
procedure SetClipBoard(Data: string);
Sets the systems clipboard string.
GetClipBoard¶
function GetClipBoard: String;
Returns the systems clipboard string.
ShowComboDialog¶
function ShowComboDialog(Caption, Prompt: string; List: TStringArray): Integer;
ShowQueryDialog¶
function ShowQueryDialog(Caption, Prompt: String; var Value: String): Boolean;
ShowMessage¶
procedure ShowMessage(Message: String);
ShowDTMEditor¶
function ShowDTMEditor(Target: TTarget; Title: String): String;
function ShowDTMEditor(Title: String): String;
ShowACA¶
function ShowACA(Target: TTarget; Title: String): TColorTolerance;
function ShowACA(Title: String): TColorTolerance;
ShowDirectoryDialog¶
function ShowDirectoryDialog(Title, InitialDirectory: String; out Directory: String): Boolean;
ShowQuestionDialog¶
function ShowQuestionDialog(Title, Question: String): Boolean;
ShowTrayNotification¶
procedure ShowTrayNotification(Title, Message: String; Timeout: Integer = 3000);
SetSimbaTitle¶
procedure SetSimbaTitle(S: String);
GetSimbaPID¶
function GetSimbaPID: TProcessID;
Returns the Simba’s PID this script is running in.
GetSimbaTargetPID¶
function GetSimbaTargetPID: TProcessID;
Returns the current Simba target PID (what is selected with the crosshair)
GetSimbaTargetWindow¶
function GetSimbaTargetWindow: TWindowHandle;
Returns the current Simba target window (what is selected with the crosshair)
SaveScreenshot¶
function SaveScreenshot: String;
Saves a screenshot of the current target. Returns the screenshot path, which will be in Simba’s Screenshots directory.
SaveScreenshot¶
function SaveScreenshot(FileName: String): String;
Saves a screenshot of the current target to the given filename. Will overwrite if the file already exists.
AddOnTerminate¶
procedure AddOnTerminate(Proc: procedure);
procedure AddOnTerminate(Proc: procedure of object);
Adds a procedure to be called when the script is terminated.
AddOnUserTerminate¶
procedure AddOnUserTerminate(Proc: procedure);
procedure AddOnUserTerminate(Proc: procedure of object);
Adds a procedure to be called when the script is terminated with the stop button being clicked.
AddOnPause¶
procedure AddOnPause(Proc: procedure);
procedure AddOnPause(Proc: procedure of object);
Adds a procedure to be called when the script is paused.
AddOnResume¶
procedure AddOnResume(Proc: procedure);
procedure AddOnResume(Proc: procedure of object);
Adds a procedure to be called when the script is resumed from pause.
AddOnResume¶
procedure AddOnResume(Proc: procedure);
procedure AddOnResume(Proc: procedure of object);
Adds a procedure to be called when the script is resumed from pause.
TerminateScript¶
procedure TerminateScript;
procedure TerminateScript(Reason: String);
Instantly terminates the script!
PauseScript¶
procedure PauseScript;
Programmatically pauses the script. The only way for the script to resumed is by the user clicking the play button.