SDK extra commands |
Top Previous Next |
Communicating with the user
Sub AlertOperator(Message As String, LocalMsgBox As Boolean, AlertListeners As Boolean)
Example
Whisker.AlertOperator "Finished Stage 1", False, True
The AlertOperator is used to display message boxes from the client to the user, without the client waiting for a response from the user. If 'LocalMsgBox' is True, then a messagebox is displayed by the client (on the machine running the program). If 'AlertListeners' is True, the SDK sends a 'broadcast' client message to all clients of the form "Alert: <message>". Both the WhiskerStatus and WebStatus clients will display a message box if they receive such a message.
In this way, a connected StatusClient, or web browser, can alert a user who is not working at the machine running the task that the task has finished.
This displays an about box showing the version number of the SDK Control.
This command displays a property page dialog, allowing the user to view or set properties of the control, such as the task name, status, etc. This dialog can be used to set the Server and PortNumber properties of a non-connected SDK control.
Connecting to the Server
Function ConnectToServer() As Boolean
Example
If Not Whisker.ConnectToServer Then Whisker.AlertOperator("Could not connect",True,False)
Connects to the Server (using the Server name and Port number given by the respective properties). Returns True if connection is made, False if not.
This method will connect both command (immediate) and event (main) sockets There is no need to worry about the Link: command, as this will be handled automatically.
This command will close all connections with the Server. If this is called by a connected client, a Disconnected Event will occur.
Development Note: The Type library defines a property called 'RemoteControlCode'. This currently does nothing, and is included for future expansion.
|