Jacky,
Are you going to display a popup or dialog when the user is to click the mouse button? Will you use the button click as a conditional in your sequence? For example, if the left mouse button is clicked then Sequence1 is executed and for the right mouse button Sequence2 is executed? An alternative may be to use the MessagePopup step type. You can specify specific captions for the buttons in the MessagePopup and also determine which button has been pushed. This is held in the MessagePopup step container as Step.Result.ButtonHit. You can assign the response value to a Local variable by adding a Post-Expression "Locals.ButtonResponse = Step.Result.ButtonHit". Where ButtonResponse is a numeric defined in your Locals context. You can then use the value of the Locals.ButtonResponse as a conditional value for your sequence execution.
If you are running your Sequence in an Operator Interface, you can also capture mouse events for the User Interface ActiveX controls including the SequenceView. Each control captures a MouseDown, MouseUp, and MouseMove event which can be captured and interpreted. The event callback also contains information about which button was actually pressed. However, the Operator Interface controls function outside of your Sequence execution, so this may not be the functionality you are looking for.
The final option is to use a code module to capture mouse events. Normally a graphical Windows application runs with a message queue. When an event occurs the event data is added to the queue. The message handler is run in a loop. The handler function removes events one by one off the queue and handles them. In an application that uses the Windows API, the messages may include Mouse Down and Mouse Up events. However, for a code module that is being called from TestStand, the normal structure does not apply. This is why it is easier to capture Mouse Events for a specific control built into a dialog.
Perhaps you can explain a bit further what it is you are trying to accomplish and we may be able to provide an implementation suggestion.
Thanks,
Tyler Tigue