GetScriptState
Returns state of the script with index ScriptIndex
If script with given index is not exists - returns st_Unknown.
Related function for script control: GetScriptName, GetScriptsList, GetScriptPath, GetScriptsCount, StartScript, StopScript, PauseResumeSelScript, StopAllScripts, SetScriptName
Pascal Syntax:
function GetScriptState(ScriptIndex : Word) : TScriptState;
TScriptState = (st_Unknown, st_Started, st_Paused);
Example Pascal
program test;
var sl : TScriptItemInfoArray;
i : Integer;
begin
sl := GetScriptsList;
if Length(sl) > 0 then
for i := 0 to Length(sl) - 1 do
begin
if GetScriptState(sl[i]) <> st_Unknown then
AddToSystemJournal(GetScriptName(sl[i]) + ' : ' + GetScriptPath(sl[i]));
end;
end.
Python
def GetScriptState(ScriptIndex) -> tuple # method will be available in stealth 10.3.7