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 

New iTunes Script!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts
View previous topic :: View next topic  
Author Message
Fluffman



Joined: 20 Jan 2007
Posts: 11

Digg It
PostPosted: Sat Mar 17, 2007 7:01 pm    Post subject: New iTunes Script!

SCRIPT VERSION 2! NOW YOU CAN JUST CHANGE THE PATH VARIABLE TO WHERE THE SCRIPTS ARE LOCATED!

Its an iTunes script!

But better!

Functions:

+ Mute/Unmute
+ Play/Pause
+ Next/Prev Track
+ Volume Up/Down
+ Current Volume on Wiimote Lights
+ Works from any program, iTunes no longer has to be the active window!
+ Uses VBS Scripts! Download from here!
+ Just put the VBS scripts where you like. Then change var.path to match


Code:

//            Better iTunes Script v2
//             Coded by Fluffman

//        Suggestions to ianduffy1@aol.com

// THIS IS BETTER THAN THE ORIGINAL SCRIPTS BECAUSE iTUNES DOES NOT NEED TO BE THE ACTIVE WINDOW!

// THE PLUS/MINUS BUTTONS WILL SHOW VOLUME ON THE WIIMOTE LIGHTS

// Wiimote Right/Left               = Next/Previous Track
// Wimote Up/Down or Plus/ Minus    = Volume Up/Down
// Wiimote A                        = Play/Pause
// Wiimote B                        = Show Volume on lights
// Wiimote Home                     = Mute/Unmute

// CHANGE THIS PATH TO WHERE THE VBS SCRIPTS ARE!
var.path = "C:\Program Files\iTunes\iTunes Scripts\"


// LEAVE THESE ALONE!

var.pathplay = var.path + "PlayPause.vbs"

var.pathnext = var.path + "next.vbs"

var.pathprev = var.path + "previous.vbs"

var.pathvolup = var.path +  "volumeup.vbs"

var.pathvoldown = var.path +  "volumedown.vbs"

var.pathvolfull = var.path +  "volumefull.vbs"

var.pathmute = var.path + "mute.vbs"

//STARTING TERMS
if (var.first = 0)
execute var.pathvolfull
var.volume = 100
var.first = 1
endif


// CHECK VOLUME
if wiimote.B

if  var.volume <= 5
var.lights = 0
endif

if  1<= var.volume <= 34
var.lights = 1
endif

if  35<= var.volume <= 74
var.lights = 3
endif

if  75<= var.volume <= 99
var.lights = 7
endif

if  var.volume = 100
var.lights = 15
endif

wiimote.leds = var.lights
wait 500ms
wiimote.Leds = 0
endif

//PLAY/PAUSE

if wiimote.A
execute var.pathplay
wait 150ms
wiimote.Leds = 15
wait 50ms
wiimote.Leds = 0
wait 50ms
wiimote.Leds = 15
wait 50ms
wiimote.Leds = 0
wait 50ms
wiimote.Leds = 15
wait 50ms
wiimote.Leds = 0
wait 50ms
endif

//NEXT TRACK
if wiimote.right
execute var.pathnext
wait 100ms
wiimote.Leds = 1
wait 100ms
wiimote.Leds = 0
wait 100ms
wiimote.Leds = 2
wait 100ms
wiimote.Leds = 0
wait 100ms
wiimote.Leds = 4
wait 100ms
wiimote.Leds = 0
wait 100ms
wiimote.Leds = 8
wait 100ms
wiimote.Leds = 0
wait 100ms
endif

//PREVIOUS TRACK
if wiimote.left
execute var.pathprev
wait 100ms
wiimote.Leds = 8
wait 100ms
wiimote.Leds = 0
wait 100ms
wiimote.Leds = 4
wait 100ms
wiimote.Leds = 0
wait 100ms
wiimote.Leds = 2
wait 100ms
wiimote.Leds = 0
wait 100ms
wiimote.Leds = 1
wait 100ms
wiimote.Leds = 0
wait 100ms
endif

//VOLUME UP
if wiimote.up or wiimote.Plus
execute var.pathvolup
if var.volume < 100
var.volume = var.volume + 10
else
endif

if  var.volume <= 5
var.lights = 0
endif

if  1<= var.volume <= 34
var.lights = 1
endif

if  35<= var.volume <= 74
var.lights = 3
endif

if  75<= var.volume <= 99
var.lights = 7
endif

if  var.volume = 100
var.lights = 15
endif

wiimote.leds = var.lights
wait 500ms
wiimote.Leds = 0
endif

//VOLUME DOWN
if wiimote.down or wiimote.Minus
execute var.pathvoldown
if var.volume > 0
var.volume = var.volume - 10
else
endif

if  var.volume <= 5
var.lights = 0
endif

if  1<= var.volume <= 34
var.lights = 1
endif

if  35<= var.volume <= 74
var.lights = 3
endif

if  75<= var.volume <= 99
var.lights = 7
endif

if  var.volume = 100
var.lights = 15
endif

wiimote.leds = var.lights
wait 500ms
wiimote.Leds = 0
endif

//MUTE

if wiimote.home
execute var.pathmute
wait 150ms
wiimote.Leds = 15
wait 50ms
wiimote.Leds = 0
wait 50ms
wiimote.Leds = 15
wait 50ms
wiimote.Leds = 0
wait 50ms
wiimote.Leds = 15
wait 50ms
wiimote.Leds = 0
wait 50ms
endif




Last edited by Fluffman on Mon Mar 19, 2007 5:02 pm; edited 11 times in total
Back to top
View user's profile Send private message
TiagoTiago



Joined: 20 Jan 2007
Posts: 711
Location: Brasil

Digg It
PostPosted: Sat Mar 17, 2007 11:05 pm    Post subject:

I think this might not be the more arpopriate forum.....
_________________
please put the scripts on the wiki so they dont get lost as new stuff is posted!
I don't always get notifications of new replies, if you see a thread I should have responded, could please email me?
Back to top
View user's profile Send private message Send e-mail
SwedishFrog
Site Admin


Joined: 25 Jan 2007
Posts: 273
Location: New York

Digg It
PostPosted: Sun Mar 18, 2007 3:08 am    Post subject:

it'd be good if you replaced the hard coded file paths with a variable
Back to top
View user's profile Send private message Visit poster's website AIM Address
RandomInsano



Joined: 27 Nov 2006
Posts: 10

Digg It
PostPosted: Sun Mar 18, 2007 6:24 pm    Post subject:

Agreed. I for example have my main windows drive as H, so someone like me would have to change the code for it to work properly.

If you can, use the environment variable '%programfiles%', or even better, just leave out the full path. It seems to me if they're all extracted to the same folder anyway, shouldn't they work fine without the paths?
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Fluffman



Joined: 20 Jan 2007
Posts: 11

Digg It
PostPosted: Mon Mar 19, 2007 4:18 pm    Post subject:

VERSION 2 OUT!

Listened to your advice. Added a path variable which you need to change to the folder containing the scripts.

Any other suggestions feel free to post them.
Back to top
View user's profile Send private message
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 522

Digg It
PostPosted: Mon Mar 19, 2007 8:29 pm    Post subject:

Suggestion to the mods: move this thread to the Scripts forum. Nice script, but definitely wrong forum. *wanders off shaking his head*

EDIT: typo
_________________
Cha0s


Last edited by Cha0s on Tue Mar 20, 2007 1:37 am; edited 1 time in total
Back to top
View user's profile Send private message
Fluffman



Joined: 20 Jan 2007
Posts: 11

Digg It
PostPosted: Mon Mar 19, 2007 10:07 pm    Post subject:

I only posted here because few people check the scripts forum. Beside this is the general discussion forum isn't it? Hence you can talk about anything here.

Besides I'm not stealing attention from anyone else's posts. This topic has been the most viewed for 2 and a half days. Nobody clearly has anything better to say.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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