Monday 13 June 2011

Glovepie


Glovepie is a programmable input emulator. It is thought to be made for the Wii remote or wiimote but it is not. It was originally made to emulate the glove 5 hand controller with the computer. It has expanded very far and can handle many different inputs including voice. GlovePIE stands for Glove programmable input emulator. Glovepie is a simple programming language but is very powerful.
              The code in Glovepie can go in almost any order because it’s so simple. It’s coding is very easy to memorize and you could probably have most of it memorized in a few days. It was programmed in c++, the base computer programming language, so it can do almost anything and has few limits. The first thing I add into Glovepie is my variables. I usually put them in a if statement that ends after being read once so it won’t keep resetting the variables. If you don’t setup a variable it will be 0 automatically. An example below:
If(var.first  == 0)
var.first = 1
var.firstvar = 15
var. secondvar = 20
endif
              The next I add in is the code for the emulations I want to do. If you want to emulate the wiimote A button to control the mouse click you write “Mouse.LeftButton = Wiimote.A”. It is very simple. You can emulate many things such as the speakers, mouse, keyboard, controller, wiimote, voice, and even p5 controller. To emulate the voice you have to use an if statement. To emulate the voice you would write if you said something then do something. It can be written:
if said(“hello world”) then press(Key.A)
or you could do:
if said(“hello world”)
press(Key.A)
endif
              If you tell the computer to press a key you should type “release(The key pressed)” so that it won’t keep holding the key. If the key is a letter or number an easier way would be to type “type(“a”)” to make it type the letter A. To add to a variable you would type “var.variable += 1;”. You can even type “var.variable += var.variable2;”. The variables work very well for everything you do and will be used in almost every program. Another way to use a variable, like in the average programming language is “var.variable ++”. You can play computer sounds such as the exclamation sound by typing “beepExclamation”. This concludes the glovepie tutorial. Hope it helps!

1 comment:

  1. Hi Andrew
    Came acfross your blog while looking for keyboard emulator.
    Have downloaded Glove-Pie but I need some help. Not using it for gaming. Whant I want to do is to organise 2 or more keyboard emulator devices, they are rfid readers. I want Glove-Pie to find the usb devices (all usb and all have the same vid pid. But they show up in Device Manager with different port/hub numbers). Then have the keyboard (data from rfid reader) placed in open application, spreadsheet in my case, each reader using a different column.
    Having trouble finding a list of codes that are avaiable. Glovepie.org coming up as being hacked.
    Just a bit of advice required, how to get usb port# set up, I can get some detai by scanning device but not the route as yet. Other code for inserting into open application. I maybe able to get Excel to get it from Glove-Pie but prefer the other way around where reads go straight into Excel
    For a model railroad project to track rolling stock on a layout to know which items are at which location..
    If you know of any code that is close I maybe could push that around to work
    Catch me on swchuck ( at ) gmail.com
    Charles Harris
    Ashhurst

    ReplyDelete