Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

GetScriptState

Returns the execution state of the script at index ScriptIndex.

Returns st_Unknown if no script with the given index exists.

Возвращает состояние выполнения скрипта с индексом ScriptIndex.

Возвращает st_Unknown, если скрипт с данным индексом не существует.

Pascal

function GetScriptState(ScriptIndex: Word): TScriptState;

Type definition:

type
  TScriptState = (st_Unknown, st_Started, st_Paused);

State values:

Value Constant Meaning
0 st_Unknown Unknown / not found
1 st_Started Started / running
2 st_Paused Paused

Python

def GetScriptState(ScriptIndex: int) -> int: ...

Pascal Example

begin
  AddToSystemJournal('Script state: ' + IntToStr(Ord(GetScriptState(0))));
end.

Python Example

AddToSystemJournal(f'Script state: {GetScriptState(0)}')

See Also

GetScriptName, GetScriptPath, GetScriptsCount, StartScript, StopScript