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

GetScriptPath

Returns full path (path to script file) of the script with index ScriptIndex

If script with given index is not exists - returns empty string.

Related function for script control: GetScriptState, GetScriptsList, GetScriptName, GetScriptsCount, StartScript, StopScript, PauseResumeSelScript, StopAllScripts, SetScriptName

Pascal Syntax:

function GetScriptPath(ScriptIndex : Word) : String;

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
    AddToSystemJournal(GetScriptName(sl[i]) + ' : ' + GetScriptPath(sl[i]));
  end;
end.

Python

def GetScriptPath(ScriptIndex) -> string  # method will be available in stealth 10.3.7