AppendLogLineString (1)

Complete Command

ZenService.Xtra.System.AppendLogLineString(string logMessage)

Input

string logMessage

Output

string (contains the file path of the data log file)

Description

Creates a text file (ExperimentName_Log.txt) inside the folder save folder/temp and the file path to the log file is returned. Numbers have to be converted to strings in order two write them into the log file. Column separators have to be specified as strings as well.

AppendLogLineString (2)

Complete Command

ZenService.Xtra.System.AppendLogLineString(string logMessage, string logFileName)

Input

string logMessage, string logFileName

Output

string (contains the file path of the data log file)

Description

This is similar to the function AppendLogLineString (1) but allows to specify the file path where the text file will be saved.

ExecuteExternalProgram (1)

Complete Command

ZenService.Xtra.System.ExecuteExternalProgram(string exeFilePath)

Input

string exeFilePath

Output

 

Description

Starts an external application (*.exe, *.py, *.mp3, ...). It may be required to add the location of the application the environmental variables, usually PATH, in order for windows to find the application. It is also possible to use the absolute file path.

ExecuteExternalProgram (2)

Complete Command

ZenService.Xtra.System.ExecuteExternalProgram(string exeFilePath, string arguments)

Input

string exeFilePath, string arguments

Output

 

Description

This is similar to the function above but it allows to specify arguments which can be passed to the application. An example could look like this: ZenService.Xtra.ExecuteExternalProgram("fiji-win64.exe", "-macro Open_CZI_OME_complete.ijm Experiment-123.czi")

ExecuteExternalProgramBlocking (1)

Complete Command

ZenService.Xtra.System.ExecuteExternalProgram(string exeFilePath, string arguments, int timeoutInMs)

Input

string exeFilePath, string arguments, int timeoutInMs

Output

integer exitCode

Description

This advanced method will run an external program and blocks the subsequent script. When the Experiment Feedback runs in synchronous script execution it also blocks the experiment until the external application is closed. It requires a parameter called timeoutinMs, which specifies after which time period the script will continue independent from the external applications. As an output it returns a so-called ExitCode (integer), which is produced by the external application when exiting. This ExitCode has to be supported by the external application. Standard Windows programs (like Notepad, etc.) just return '0'. When using a special application or self-written applications it is possible to set a special own ExitCode.

ExecuteExternalProgramBlocking (2)

Complete Command

ZenService.Xtra.System.ExecuteExternalProgram(string exeFilePath, int timeoutInMs)

Input

string exeFilePath, int timeoutInMs

Output

integer exitCode

Description

This is the same method as above but with additional arguments for the external application. The timeout parameter is still required.

PlaySound (1)

Complete Command

ZenService.Xtra.System.PlaySound()

Input

 

Output

 

Description

This will play the system sound.

PlaySound (2)

Complete Command

ZenService.Xtra.System.PlaySound(string waveFilePath)

Input

string waveFilePath

Output

 

Description

Plays the specified wave sound file.

RunLoopScript

Complete Command

ZenService.Xtra.System.RunLoopScript()

Input

 

Output

 

Description

This command will trigger a run of the LoopScript. It is only meant to be used when running the Experiment Feedback script in synchronous script execution.

WriteDebugOutput

Complete Command

ZenService.Xtra.System.WriteDebugOutput(string message)

Input

string

Output

 

Description

Writes string messages in the Output for debugging.