View Single Post
  #2  
Old 04-02-2011, 01:43 PM
Zhi Zhi is offline
Member
 
Join Date: Mar 2011
Posts: 49
I have found a way around:

def myTask():
while True:
btn = yield viztask.waitMouseDown(None) #Wait for mouse click
viz.visible(viz.OFF) #Turn off the screen

if btn.button == 1: #Left botton click
yield function_a()
elif btn.button == 4: #Right botton click
yield function_b()

yield viztask.waitTime(1)
viz.visible(viz.ON) #Turn on the screen

viztask.schedule(myTask)

Cheers!
Zhi
Reply With Quote