G
guywassom
kannt jemand mir bitte diese Funktion Zeile für Zeile erklären, eventuel eine Syntax erklärung:
Code:
function fr_SystemFileExecute(FileName)
/* FunctionDescription
@Name fr_SystemFileExecute
@Description Add a application to the "TestedApps" and execute the application
@Param FileName: Name of the file to execute
@Result Returns the result of executing the file.
@Result True: OK
@Result False: Something went wrong
FunctionDescription */
{
var Index, App;
try
{
if (TestedApps.Find(FileName)==-1)
TestedApps.Add(FileName,"",1,false);
Delay(500);
Index = TestedApps.Find(FileName);
TestedApps.Items(Index).Launch = true;
// Will not start if another instance is running
App = TestedApps.Items(Index).Run();
while (!App.Exists)
{
Delay(500);
}
}
catch(exception)
{
return false;
}
return true;
}