Tuesday, January 4, 2011

Glovepie Wiimote Nunchuk as mouse

if Wiimote.Nunchuk.JoyX<-0.21
Mouse.CursorPosX=Mouse.CursorPosX-9
end if

if Wiimote.Nunchuk.JoyX>0.21
Mouse.CursorPosX=Mouse.CursorPosX+9
end if

if Wiimote.Nunchuk.JoyY<-0.21
Mouse.CursorPosY=Mouse.CursorPosY-9
end if

if Wiimote.Nunchuk.JoyY>0.21
Mouse.CursorPosY=Mouse.CursorPosY+9
end if

if Wiimote.Nunchuk.ZButton=1
Mouse.LeftButton=1
wait 250 ms
Mouse.LeftButton=0
end if

if Wiimote.Nunchuk.CButton=1
Mouse.RightButton=1
wait 250 ms
Mouse.RightButton=0
end if

1 comment: