View Single Post
  #5  
Old 06-10-2009, 12:31 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You loop should work, but there is no connection between it and your callbacks. It loops through and then leaves Trial set to a value of 8. If you want Trial to update each time a key is pressed then increment it in your keyboard callback function.
Code:
Trial = 0
def onKeyDown(key):
	global Trial	
	Trial += 1
	
viz.callback(viz.KEYDOWN_EVENT, onKeyDown)
Reply With Quote