Basic Script Mode Properties

The "Mode" properties are used to configure the modalities with which the script is to be run.

To change the Mode properties of a Basic Script, select the object with the mouse and use the Movicon "Properties Window" which opens.

 

 

Run at Server

This property is to be used when the Redundancy between two projects is used. When enabled, the script will only be run in the project which has control at that moment. If, for instance, both the Primary and Secondary projects are being run, the Primary project will be in control. In this case, if the Basic Script is invoked in the Secondary project, it will be run in the Primary project.

This also happens when the script is run from a "Child Project" set to connect to a "Network Server". Also in this situation, the script wil be run in the "Network Server" project instead of the Child Project.

 

UI Interface

This setting allows you to add the user interface management to the  basic script. You will need to enable this property when using controls such as the "MsgBox" or "Dialog Box" inside the Basic Script.

 

The below listed WinWrap functions are not supported when the script's "Use User interface" property is not activated  and will raise an error when the AppActivate, AboutWinWrapBasic, Shell, or ShowPopupMenu script code are being loaded.  

 

Separate Thread

This selection allows you to execute the Basic routine in a separate thread and therefore also at the same time as another basic routine or process in the same thread (dialog window).

This option is used when the basic script is run while another is already running. If this option is not checked in both these basic scripts, the running of the second one will be buffered and run when the first one has terminated.

Please be reminded that not all the Movicon functions are available when run in a separate thread. Therefore, please refer to the guide for each instruction to verify whether it can be run or not in a separate thread.

 

Please be careful with Scripts which do not use separate threads but perform long operations.  These Scripts are placed in the same shared thread (limited resource consumption), but they queue up one after the other to be run.   Therefore, you will need to check the "Separate Thread" option for Scripts which perform long operations.

 

Create its Trace Tab

When this option box is enabled, a TAB will be created in the custom Output window for the Basic Script at runtime to print messages inherent to the script, e.g. the Debug.Print.

 

Modal Dialogs

When this option is enabled, the Dialog windows opened by the script will become modal dialog windows. Otherwise, the dialog windows will be placed in the background when clicked nearby.

 

 

See Also