Vizard 8 » Command Index » Vizard modules » viztask » <viztask>.waitMouseUp
8.0

<viztask>.waitMouseUp

Wait for a specified mouse button release

<viztask>.waitMouseUp(  
button  
)  
button
The mouse button to wait for.

If button is None, then the Condition will wait for any mouse button to be released.

Remarks

This command will create a Condition object that will wait for one of the specified mouse buttons to be released.

The yielded command returns a viz.Data object with the following information about the condition:

Properties

button

The mouse button that was released

time

The precise time of the mouse button release

Return Value

viztask.Condition object

Example

import viztask

def MyTask():

    while True:

        yield viztask.waitMouseUp(viz.MOUSEBUTTON_LEFT)

        print('Left mouse button released')

viztask.schedule( MyTask() )