I'm a special ed teacher and bought this roll up drum kit
http://www.dreamcheeky.com/index.php?pa ... uct&pid=33
So i could not only use it in class as it is but also however the heck I want to so I can meet the needs of my students. I needed to be able to program whatever sounds/keys/mouse moves etc I wanted so here is my first test script. (still need to have AHKHID.ahk in the same directory)
I was surprised when it wasn't recognised as a joystick. Also, I don't fully understand everything that's going on in this script but it works so far.
Code:
;Must be in auto-execute section if I want to use the constants
#Include %A_ScriptDir%\AHKHID.ahk
;Create GUI to receive messages
Gui, +LastFound
hGui := WinExist()
;Intercept WM_INPUT messages
WM_INPUT := 0xFF
OnMessage(WM_INPUT, "InputMsg")
;Register Remote Control with RIDEV_INPUTSINK (so that data is received even in the background)
d := HID_Register(65440, 1, hGui, RIDEV_INPUTSINK)
Return
InputMsg(wParam, lParam)
{
Local devh, iKey, sLabel
Critical
;Get handle of device
devh := HID_GetInputInfo(lParam, II_DEVHANDLE)
;Get data
HID_GetInputData(lParam, uData)
iKey := NumGet(uData, 0, "UInt")
sLabel := "Drum" . iKey
if (ikey > 0 AND ikey = 2048 OR ikey = 512 OR ikey = 4096 OR ikey = 1024 OR ikey = 8192 OR ikey = 256)
Gosub, %sLabel%
;msgbox, %sLabel%
}
Drum2048:
soundplay, fart1.wav
return
Drum512:
soundplay, fart2.wav
return
Drum4096:
soundplay, fart3.wav
return
Drum1024:
soundplay, fart4.wav
return
Drum8192:
soundplay, fart5.wav
return
Drum256:
soundplay, fart6.wav
return
The sound effects are a bit "cheeky" (I'm sorry for that one...) but they are just the beginning!
Here's a zip with the "hole" package (teeheehee)
http://www.autohotkey.net/~evandevon/Drumkit%201.zip
Download this and take it around on a usb key so that you don't need to install the drivers/software for this thing.
_________________
Inventing problems that need solutions...
Open Communicator
MouseTrainer