1.13.2 Script Window

The Script Window is the default output window for Origin C. Whenever you output strings or numeric values they will appear in the Script Window. You can change which window such output appears in by setting LabTalk's Type.Redirection property. This property allows you to redirect your application's output to the Script window, Command window, Results Log, or even a Note window. See LabTalk's Type.Redirection property for more details.

The following example will save the current Redirection setting, set it to redirect output to the Script window output, then the Command window, and then restore the saved setting.

string strTypeRedir = "type.redirection";
double dCurTypeRedir;
LT_get_var(strTypeRedir , &dCurTypeRedir); // get current

LT_set_var(strTypeRedir , 5); // 5 for Script window
out_str("Hello Script Window");

LT_set_var(strTypeRedir , 128); // 128 for Command window
out_str("Hello Command Window");

LT_set_var(strTypeRedir , dCurTypeRedir); // restore current