Hacking Glovepie scripts

Tommy78

Member
OP
Newcomer
Joined
Jun 25, 2006
Messages
9
Trophies
0
XP
7
Country
Belgium
I did a quick itunes control script in glovepie for the wiimote, it's entirely based on the glovepie scripts by vkapadia so all praise goes to him!
smile.gif


Feel free to use/improve it!
What more can we use the wiimote for? post your scripts here please.

//WiiTunes - itunes control script for the wiimote.
//by Tommy Serrien
//[email protected] Antwerp/Belgium

//I made this script to control my itunes from allover my flat,
//this was my first script ever and it was based on the wiimouse
//accel script by vkapadia (hope you don't mind
smile.gif
)
//The knight rider lights were also scripted by vkapadia.
//The only thing i did was map the itunes shortcuts to the wiimote
//keypresses, it's a dirty job but someone had to do it!
tongue.gif
.
//Feel free to improve it, i wanted the home button to load itunes but
//that seems impossible with glovepie?
//Controls:
//D-Pad left= Rewind
//D-Pad right= Fast forward
//D-Pad up= Next
//D-Pad down= Previous
//B-Button = Play/Pause
//Home = No function yet
//A-Button = Mute
//Plus and Minus = Volume Up/Down
//One = No function
//Two = No function

//D-pad
if wiimote.Up
ctrl+right = true
Wait 200 ms
ctrl+right = false
endif
if wiimote.Down
ctrl+left = true
Wait 200 ms
ctrl+left = false
endif
if wiimote.Left
ctrl+alt+left = true
Wait 1.5 s
ctrl+alt+left = false
endif
if wiimote.Right
ctrl+alt+right = true
wait 1.5 s
ctrl+alt+right = false
endif


//A+B button
ctrl+alt+down = Wiimote.A
space = Wiimote.B
//The wiimote rumbles when you press play/pause
if wiimote.B then
wiimote.Rumble=1
wait 100 ms
wiimote.rumble=0
endif

//+ and -
if wiimote.plus then
ctrl+up = true
wait 50 ms
ctrl+up = false
endif
if wiimote.minus then
ctrl+down = true
wait 50 ms
ctrl+down = false
endif


//LED script stolen from vkapadia because it's so cool
smile.gif

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
//wait 200 ms
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 100 ms
var.kitt = (var.kitt + 1) % 8
endif
 

paOol

Well-Known Member
Member
Joined
May 22, 2006
Messages
274
Trophies
0
XP
135
Country
nice, will try this when i get a bluetooth adapter. got a few questions for you though

1. what language is this in?
2. wheres the cheapest place i can get a bluetooth adapter?
3. if im playing a fullscreen game, and itunes is running minimized, will the controls still work?
4. how do u use the scripts? just double click and it'll work?
 

Tommy78

Member
OP
Newcomer
Joined
Jun 25, 2006
Messages
9
Trophies
0
XP
7
Country
Belgium
Ok, i try to answer your questions as good as i can:

1. It's a script for Glovepie which is a small program that maps input devices to keystrokes and is compatible with the wiimote, you can download it here:
Glovepie dload page

2. Your local pc shop??
smile.gif


3. No that doesn't work, itunes has to be selected, if anyone can fix this please help.

4. You load it in glovepie and click the run button

For more scripts and howto's check this page :

wii hacks page

nice, will try this when i get a bluetooth adapter. got a few questions for you though

1. what language is this in?
2. wheres the cheapest place i can get a bluetooth adapter?
3. if im playing a fullscreen game, and itunes is running minimized, will the controls still work?
4. how do u use the scripts? just double click and it'll work?
 

Lukeage

Well-Known Member
Member
Joined
Feb 24, 2004
Messages
178
Trophies
0
Website
Visit site
XP
271
Country
3. No that doesn't work, itunes has to be selected, if anyone can fix this please help.

The only way I know how to do this is to actually code in into the program (iTunes) to hook into the OS (ie, intercept the calls). I'm personally not aware of any way to intercept calls and send them to a background application, but someone with more Win32 API coding experience might know of a way.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    AncientBoi @ AncientBoi: [goes back to 🛌 ] zzzzzzzzzzzzzz +1