WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GlovePIE Wii-Mote Scripts
Goto page Previous  1, 2, 3 ... 41, 42, 43 ... 53, 54, 55  Next
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
coolbrow



Joined: 29 Dec 2007
Posts: 6

Digg It
PostPosted: Tue Jan 01, 2008 7:04 am    Post subject:

Hey guys, just finished my first script form scratch.

Its a pretty simple, but highly effective Wiimote Firefox Controller, try it yourselves!

Any comments, frustrations, improvements, would be greatly appreciated

Firefox Wiimote

Code:

/*
Coolbrow's Firefox Wiimote Browser

This Only Works in FireFox
No Ir Needed

Shows Battery Life in Debug Window

Controls:

D-Pad:   Mouse
A:       Left Click
B:       Right Click
Minus:   Restore Window (Makes Small)
Plus:    Maximize Window
Home:    Your Home Page
One:     New Tab
Two:     Scroll through the tabs

Double Click Minus:   Minimize Window
Double Click One:     Close Current Tab

Hold Down B :
D-Pad Left and Right:  Backwards and Forwards Buttons
      Up and Down:     Scroll Up and Down
*/

//LED's 1 and 4 mean its connected
//LED Code
Wiimote.Led1 = true
Wiimote.Led2 = false
Wiimote.Led3 = false
Wiimote.Led4 = true

//You can change these here to fit your preferences
//Mouse movement, change the 20 to get faster or slower
//(higher the number = faster the speed)
if wiimote.Left = true and wiimote.b= false then
Mouse.CursorPosX = Mouse.CursorPosX - 20
end if

if wiimote.Right = true and wiimote.b= false then
Mouse.CursorPosX = Mouse.CursorPosX + 20
end if

if wiimote.Up = true and wiimote.b= false then
Mouse.CursorPosY = Mouse.CursorPosY - 20
end if

if wiimote.Down = true and wiimote.b= false then
Mouse.CursorPosY = Mouse.CursorPosY + 20
end if

//Button assignments here
//Change left side, if needed
Mouse.LeftButton = Wiimote.A
Alt+Space+R = SingleClicked(Wiimote.Minus)
Alt+Space+N = DoubleClicked(Wiimote.Minus)
Alt+Space+X = Wiimote.Plus
RightAlt+Home = Wiimote.Home
Ctrl+t = SingleClicked(Wiimote.one)
Ctrl+W = DoubleClicked(Wiimote.one)
Ctrl+Tab = Wiimote.Two
Alt+Right = Wiimote.B and Wiimote.Right
Alt+Left = Wiimote.B and Wiimote.Left

if pressed(Wiimote.B) then
  var.Right = true
end if

//Stops right click when going back, forwards, scroll up, scroll down
if Wiimote.B and (Wiimote.Up or Wiimote.Down or Wiimote.Left or Wiimote.Right) then
  var.Right = false
end if

mouse.RightButton = released(Wiimote.B) and var.Right

//Scroll code here
//Allows for continual scroll when button is held
if Wiimote.B and Wiimote.Up
   mouse.WheelUp = true
   wait 50 ms
   mouse.WheelUp = false
endif

if Wiimote.B and Wiimote.Down
   mouse.WheelDown = true
   wait 50 ms
   mouse.WheelDown = false
endif


// Battery info
if Wiimote.Battery <= 12 and var.warned == FALSE then
Say "Low Battery"
var.warned = TRUE
endif
var.bat = Wiimote.Battery / 192 * 100
debug ='Battery= '+var.bat+'%'
Back to top
View user's profile Send private message
Snacnam



Joined: 30 Dec 2007
Posts: 29

Digg It
PostPosted: Tue Jan 01, 2008 3:24 pm    Post subject:

My Wii Guitar (for Frets On Fire and the likes)

Code:
[code]//Created By Joe Letizia
//Question or Comments mustangman7723@hotmail.com

//**********IMPORTANT NOTICE*********//
  //********************************//
   //******************************//
   //*****************************//
   //Pressing Up in a menu is the same as pressing green//

//Sets Wiimote LEDs
wiimote.leds= 9

//Fret Buttons
keyboard.f1= wiimote.Classic.a
keyboard.f2= wiimote.Classic.b
keyboard.f3=wiimote.Classic.x
keyboard.f4= wiimote.Classic.y
keyboard.f5= wiimote.Classic.ZL

//Face Buttons
//Strums
keyboard.return = wiimote.Classic.up
keyboard.rightshift = wiimote.Classic.down
//Knobs
keyboard.esc= wiimote.classic.minus
keyboard.esc= wiimote.classic.plus

//analog stick movement
keyboard.up = wiimote.classic.joy1Y<= - 25%
keyboard.down= wiimote.classic.joy1Y>=25%
keyboard.left= wiimote.classic.joy1X<= -25%
keyboard.right= wiimote.classic.joy1X>=25%

[/code]

Works 100%
Back to top
View user's profile Send private message
leynadix



Joined: 28 Dec 2007
Posts: 44
Location: Mataró, Catalunya

Digg It
PostPosted: Thu Jan 03, 2008 2:18 am    Post subject:

Ok changed, thanks other!!

Code:

//Tekken 3 By Daniel Estudillo  3/1/08
//Thanks to all of wiili.org forums and specially to Carl Kenner, the creator of Glove Pie
/*
Questions or others:
Leynad_IX@hotmail.com

Configura los controles:
arriva/up W
abajo/down S
izquierda/left A
derecha/right S
puño flojo/punch low G
puño fuerte/punch high T
patada floja/kick low Y
Patada fuerte/kick high U
Start X
select Z
salir del juego"escape" home

 Para pegar puños usa el wiimote, pega puños con la parte de abajo del mando hacia la pantalla, usa el botón A o b, o ambos
 para usar los ataques mientras pegas// igual con el nunchaku.
 For punch, use the down face of wiimote an shake it while press a for low punch or b for high punch, or both for both punch
  while shakeit/for kick shake the nunchuk with Z and C.
 the movements controls are joy of nunchuk or cross.
Los controles de movimiento són el joy del nunchaku y la cruceta del wiimote  */
//Información Batería baja
Wiimote.Led4 = (wiimote.Battery  <= 110 and > 85)
Wiimote.Led3  =(wiimote.Battery  <= 85 and > 60)
Wiimote.Led2 = (wiimote.Battery  <= 60 and > 35)
Wiimote.Led1 = (wiimote.Battery  <= 35 and > 10)
//script Tekken 3
//Puñetazos con la derecha "wiimote"
Key.G = ((wiimote.rawforceY >=90 and < 150) and (wiimote.a = true))
Key.T = ((wiimote.rawforceY >=85 and <150) and (wiimote.b = true))
//patadas con el nunchaku
Key.Y = ((wiimote.Nunchuk.RawForceY >120 and <200 ) and (nunchuk.CButton = true))
Key.U = ((wiimote.Nunchuk.RawForceY >120 and <200 ) and (nunchuk.ZButton))
//mover con el joystic o con la cruceta del wiimote
wasd = nunchuk.Joy
W = wiimote.Up
S = wiimote.Down
A = wiimote.Left
D = wiimote.Right
//start y select
Key.z = wiimote.one
Key.x = wiimote.Two
Key.Escape = wiimote.home
[/code]

Last edited by leynadix on Thu Jan 03, 2008 5:06 pm; edited 3 times in total
Back to top
View user's profile Send private message
CarlKenner
Site Admin


Joined: 29 Nov 2006
Posts: 614

Digg It
PostPosted: Thu Jan 03, 2008 7:55 am    Post subject:

Instead of writing:
Code:
if contdition then
  thing = true
else
  thing = false
end if


just write:
Code:
thing = condition
Back to top
View user's profile Send private message Send e-mail
HiNtZ



Joined: 27 Dec 2007
Posts: 67

Digg It
PostPosted: Tue Jan 08, 2008 10:18 pm    Post subject:

My first script!

Its for WinAmp (latest one). Read the script info for more.

Its a nice remote to use with music or media, but it does take getting used to. Obviously my tastes won't suit all, so feel free to bin it, or edit it.

I am a total noob, Half of what I've written was guessing!

Feedback to the E-mail in the script....Cheers

Code:
//Patchwork WinAmp Script
//Spence 2008 Lightside55@hotmail.com
//
// I'll start by saying I really had no idea about writing scripts till i had a go, so there may be some problems for
// other people. The only problem i can see is the fact i have linked the fuctions to keys on my multimedia keyboard
// (Key.NextTrack etc) so if you don't have those keys, you will have to bind my scripts to your buttons some other way.
//
// If it works - E-mail me! If it doesn't work - E-mail me! :-D
//
//Includes my favorite bits of a variety of scripts, including the addition of
//a script written by me (My First One Ever!) to control the track Forward/Back action with a flick
//to the left or the right. Also, the Tilt/Seek Function.

//The settings are pretty straight forward, If i can write it, a noobie can read it. To increase the
//force required to change track, then increase the values (Default: 45) below.


// Track Changes using a 'Flicking' Technique.   (LEFT/RIGHT Flick)
Key.NextTrack = (Wiimote1.RelAccX < -45) in m per s per s
Key.PrevTrack = (Wiimote1.RelAccX > 45) in m per s per s

// *************The Technique Below Requires You To Press & Hold The B button whilst tilting**************

// Skip Forward Slow (Tilt the wiimote more than 20 degreees to the right, but not more than 60 degrees to achive a slow
// seeking speed)
if wiimote.b = true then
key.right = (Wiimote1.Roll > 20 but < 60) deg
wait 400 ms
Key.Right = false
endif


// Skip Forward Fast (Tilt the wiimote more than 80 degrees to the right to do a super seek....It does skip VERY fast
// so you can simply hold the wiimote at 90 degrees  and 'flick' the B button to do 10 second incriments)
if wiimote.b = true then
key.right = (Wiimote1.Roll > 80) deg
wait 50 ms
Key.Right = false
endif


// Skip Back Fast (Tilt the wiimote more than 80 degrees to the left to do a super seek....It does skip VERY fast
// so you can simply hold the wiimote at 90 degrees  and 'flick' the B button to do 10 second incriments)
if wiimote.b = true then
key.Left = (Wiimote1.Roll < -80) deg
wait 50 ms
Key.Left = false
endif

// Skip Back Slow (Tilt the wiimote more than 20 degreees to the left, but not more than 60 degrees to achive a slow
// seeking speed)
if wiimote.b = true then
key.Left = (Wiimote1.Roll < -20 but > -60) deg
wait 400 ms
Key.Left = false
endif

 //***********************************************************************************************************************









//Not my code, but creds to the original author....It is my favorite!

//delay speed for flashing LEDs. higher = slower
var.KITTspeed = 100 ms
//LEDs look somewhat like KITT's grill from Knight Rider
if 0 = 0 then
  if var.kitt = 0 then
    wiimote.Leds = 1
  endif
  if var.kitt = 1 then
    wiimote.Leds = 3
  endif
  if var.kitt = 2 then
    wiimote.Leds = 6
  endif
  if var.kitt = 3 then
    wiimote.Leds = 12
  endif
  if var.kitt = 4 then
    wiimote.Leds = 8
  endif
  if var.kitt = 5 then
    wiimote.Leds = 12
  endif
  if var.kitt = 6 then
    wiimote.Leds = 6
  endif
  if var.kitt = 7 then
    wiimote.Leds = 3
  endif
  wait var.KITTspeed
  var.kitt = (var.kitt + 1) % 8
endif


//Buttons (Everyone should know about these by now) ;-)

Key.Enter = Wiimote1.A

Key.PlayPause = Wiimote.Home



//Code taken from the Original 'Wiimouse_IR' Script. I have made a slight change to the delay to suit my taste.
//Thanks due once again.
//D-Pad
if wiimote.Up
Up = true
Wait 90 ms
Up = false
endif
if wiimote.Down
Down = true
Wait 90 ms
Down = false
endif
if wiimote.Left
Left = true
Wait 90 ms
Left = false
endif
if wiimote.Right
Right = true
Wait 90 ms
Right = false
endif

//System Volume   From same script as D-Pad Functions
if wiimote.plus then
  volumeup = true
  wait 60 ms
  volumeup = false
endif
if wiimote.minus then
  volumedown = true
  wait 60 ms
  volumedown = false
endif
Back to top
View user's profile Send private message
St0mPy



Joined: 21 Dec 2007
Posts: 7

Digg It
PostPosted: Thu Jan 10, 2008 2:52 pm    Post subject:

Very Simple Alarm Script:
Code:

//WiiAlarm 0.1
//Move the mouse on the top left corner run the script and when some1
//moves your mouse, the wiimote will rumble =P
if not ((Mouse.x == 0) and (Mouse.y==0)) then
  Wiimote.Rumble = true;
  wait 20 ms;
  Wiimote.Rumble = false;
endif
Back to top
View user's profile Send private message
Haruhiism



Joined: 12 Jan 2008
Posts: 4

Digg It
PostPosted: Sat Jan 12, 2008 6:28 am    Post subject:

woooooo first post and script
i noticed that there wasn't a script for realplayer so....
A simple script but it gets the job done
everything in this script was written by me

Code:

//Real Player script  Haruhiism

//pause and play
Ctrl + P = wiimote.A

//Fullscreen
Ctrl + three = wiimote.plus

//Back to normal
F7 = wiimote.minus

//Fastforward
Ctrl + Shift + F4 = wiimote.right

//Rewind
Ctrl + Shift + F3 = wiimote.left

//Volume up
Ctrl + up = wiimote.up

//Volume down
Ctrl + down = wiimote.down

//Close the current window
Alt + F4 = HeldDown(wiimote.2, 3s)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Goto page Previous  1, 2, 3 ... 41, 42, 43 ... 53, 54, 55  Next
Page 42 of 55

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group