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 

Help with a script

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
Vrilya



Joined: 08 Jun 2008
Posts: 4
Location: Sweden

Digg It
PostPosted: Sun Jun 08, 2008 3:36 am    Post subject: Help with a script

Hey!

I have just been starting to try out Glovepie a bit and I believe it does it's job pretty well.. however I would like to know it there is any way to change the assignments of keys in the middle of a running script... or just for example disabling the wiimote mouse emulation?

For example... I am playing around a little bit with a world of warcraft script now and I have button A and button B on the wiimote assigned to the right and left mouse buttons.
I would like to be able to switch these buttons out when I am playing to something else... is that even possible?

//Vrilya
Back to top
View user's profile Send private message MSN Messenger
TigerGD



Joined: 16 Apr 2007
Posts: 71
Location: SoCal

Digg It
PostPosted: Mon Jun 09, 2008 12:44 am    Post subject:

Code:


var.ScriptAB = True
If pressed(Wiimote.[whateverbutton])
   toggle(var.ScriptAB)
EndIf
If var.ScriptAB
   [fill in button assignments here]
   Else
   [fill in alternate button assignments here]
EndIf

That ought to do it for you. [/code]
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Vrilya



Joined: 08 Jun 2008
Posts: 4
Location: Sweden

Digg It
PostPosted: Mon Jun 09, 2008 10:57 am    Post subject:

thanks alot.... I'll try it out tonight.
and btw... I really appreciate the help Smile

wkr
Vrilya
Back to top
View user's profile Send private message MSN Messenger
Vrilya



Joined: 08 Jun 2008
Posts: 4
Location: Sweden

Digg It
PostPosted: Tue Jun 10, 2008 1:38 am    Post subject:

ok... soo I tried your code but it did'nt work... I sat for hours reading through the manual to come up with something different.
The thing with the code you posted was just a single mistake.... I am sure you knew about it but kinda missed it somehow but anyway.

as the script is constantly looping it will automatically set var.ScriptAB to true.. as that is the first thing the script is telling the variable before we are pressing the button to assign new button assignments.

however I changed the code to start out like this instead

Code:
var.ScriptAB = var.ScriptAB
If pressed(Wiimote.[whateverbutton])
   toggle(var.ScriptAB)
EndIf

As var.ScriptAB is equal to either true or false depending on the toggle(var.ScriptAB), the loop of the script will automaticaly set it to True everytime it loops even though you have toggled it to false.

anyway thanks alot for the code you gave me... it took me a few hours as I said to get it to really work as I wanted it to but I learnt alot from reading the manual and scanning through all sorts of code. Wink

wkr
Vrilya
Back to top
View user's profile Send private message MSN Messenger
Wreyth



Joined: 03 Nov 2007
Posts: 77

Digg It
PostPosted: Mon Jun 23, 2008 8:08 am    Post subject:

ok i have found the easiest way for me instead of creating a bunch of variables is to write it out like this



Code:

if Wiimote.Nunchuk.CButton then
escape = Wiimote.A
elseif Wiimote.Nunchuk.ZButton then
mouse.rightbutton = Wiimote.A
else
mouse.leftbutton = Wiimote.A
end if




hope that shines some light for ya
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
Page 1 of 1

 
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