View Single Post
  #2  
Old 10-14-2008, 08:12 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use the following code to simulate a mouse press/release in windows:
Code:
import win32api
import win32con

#Simulate left mouse button pressed
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0,0)

#Simulate left mouse button released
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0,0)
Just call the corresponding code when the wiimote button is pressed/released and you should now be able to interact with all GUI elements and other applications that are running on your system.
Reply With Quote