From WiiLi
/*//////////////////////////////////////////////////////////////////////////////
//////////////////////////// computer controll v4.00!! /////////////////////////
////////////////////////////////////////////////////////////////////////////////
up is up esk.
a is leftbutton and vice versa
one opens mycomputer
two is enter
plus is volume up
minus is volume down
holding down home ant pressing a arrow button will scholl that way
press b to see the battery level of the wiimote on the debug line
press d to see the size and how far apart the dots that the wiimote sees with are
press g to see the gs of the wiimote in the debug line
*/
// IR bit
if wiimote.dot1vis then
if abs(wiimote.dot1x - var.ox) > 1 then
Mouse.CursorPosX = smooth(((1024-wiimote.dot1x) * Screen.Width / 1024) * 1.1 - 50, 10)
endif
if abs(wiimote.dot1y - var.oy) > 1 then
Mouse.CursorPosY = smooth(((wiimote.dot1y) * Screen.Height / 768) * 1.1 - 40, 10)
endif
endif
// led bit
if mouse.x = 0.00 or mouse.x = 1.00
wiimote.leds = 0
endif
if mouse.x = 0.01 or mouse.x = 0.02 or mouse.x = 0.03 or mouse.x = 0.04 or mouse.x = 0.05 or mouse.x = 0.06 or mouse.x = 7 or mouse.x = 0.08 or mouse.x = 0.09 or mouse.x = 0.10 or mouse.x = 0.11 or mouse.x = 0.12 or mouse.x = 0.13 or mouse.x = 0.14 or mouse.x = 0.15 or mouse.x = 0.16 or mouse.x = 0.17 or mouse.x = 0.18 or mouse.x = 0.19 or mouse.x = 0.20 or mouse.x = 0.21 or mouse.x = 0.22 or mouse.x = 0.23 or mouse.x = 0.24
wiimote.leds = 1
endif
if mouse.x = 0.25 or mouse.x = 0.26 or mouse.x = 0.27 or mouse.x = 0.28 or mouse.x = 0.39 or mouse.x = 0.30 or mouse.x = 0.31 or mouse.x = 0.32 or mouse.x = 0.33 or mouse.x = 0.34 or mouse.x = 0.35 or mouse.x = 0.36 or mouse.x = 0.37 or mouse.x = 0.38 or mouse.x = 0.49 or mouse.x = 0.40 or mouse.x = 0.41 or mouse.x = 0.42 or mouse.x = 0.43 or mouse.x = 0.44 or mouse.x = 0.45 or mouse.x = 0.46 or mouse.x = 0.47 or mouse.x = 0.48 or mouse.x = 0.49
wiimote.leds = 2
endif
if mouse.x = 0.50 or mouse.x = 0.51 or mouse.x = 0.52 or mouse.x = 0.53 or mouse.x = 0.54 or mouse.x = 0.55 or mouse.x = 0.56 or mouse.x = 0.57 or mouse.x = 0.58 or mouse.x = 0.69 or mouse.x = 0.60 or mouse.x = 0.61 or mouse.x = 0.62 or mouse.x = 0.63 or mouse.x = 0.64 or mouse.x = 0.65 or mouse.x = 0.66 or mouse.x = 0.67 or mouse.x = 0.68 or mouse.x = 0.79 or mouse.x = 0.70 or mouse.x = 0.71 or mouse.x = 0.72 or mouse.x = 0.73 or mouse.x = 0.74
wiimote.leds = 4
endif
if mouse.x = 0.75 or mouse.x = 0.76 or mouse.x = 0.77 or mouse.x = 0.78 or mouse.x = 0.79 or mouse.x = 0.80 or mouse.x = 0.81 or mouse.x = 0.82 or mouse.x = 0.83 or mouse.x = 0.84 or mouse.x = 0.85 or mouse.x = 0.86 or mouse.x = 0.87 or mouse.x = 0.88 or mouse.x = 0.89 or mouse.x = 0.90 or mouse.x = 0.91 or mouse.x = 0.92 or mouse.x = 0.93 or mouse.x = 0.94 or mouse.x = 0.95 or mouse.x = 0.96 or mouse.x = 0.97 or mouse.x = 0.98 or mouse.x = 0.99
wiimote.leds = 8
endif
// the buttons
Mouse.LeftButton = Wiimote1.A
Mouse.MiddleButton = Wiimote1.Home
key.VolumeDown = wiimote1.Minus
key.VolumeUp = wiimote1.Plus
key.Left = wiimote1.Left
key.Right = wiimote1.Right
key.Enter = wiimote1.Two
key.MyComputer = wiimote1.One
mouse.RightButton = wiimote.B
endif
if wiimote.home = true
mouse.WheelUp = wiimote.Up
mouse.WheelDown = wiimote.Down
mouse.WheelLeft = wiimote.Left
mouse.WheelRight = wiimote.Right
endif
if wiimote.Up
Up = true
Wait 250 ms
Up = false
endif
if wiimote.Down
Down = true
Wait 250 ms
Down = false
endif
// varibles
var.dot1 = "Dot 1: (X =" + Wiimote.Dot1X + ") (Y =" + Wiimote.Dot1Y + ") (Size = " + Wiimote.Dot1Size + ")"
Var.dot2 = " Dot 2: (X =" + Wiimote.Dot2X + ") (Y =" + Wiimote.Dot2Y + ") (Size = " + Wiimote.Dot2Size + ")"
var.ox = wiimote.dot1x
var.oy = wiimote.dot1y
// debugs
If Key.D Then
Debug = (var.dot1 + Var.dot2)
Endif
If Key.B Then
Debug = "[Wiimote's Battery Level = " + (Wiimote.Battery * 0.52083) + '%}'
endif
If Key.G Then
Debug = "Wiimote's Gs (X = " + Wiimote.gX + ") (Y = " + Wiimote.gY + ") (Z = " + Wiimote.gZ +")"
Endif
/*wriiten by lee fogg allan
i want to say hi to daniel bacon,paige williams,sarah soukeur,john tomlinson,harry tinsley,carter and grant roberts.
if you have eny problems with your bluetooth or glovepie or need some help at all
just send your name your problem with your script to me at leefoggallan@hotmail.co.uk
or at youtube with fogglee
and i'll try by best to rezolve the problem
(i bet when you wer reading that you thorght it sounded gay or something)