Adam1213 Posted December 7, 2008 Posted December 7, 2008 I am trying to use Autoit for usb communication with a HID (human interface device).I have found an USB library which should be able to do the communication (the sample app provided worked). I am currently trying to use the dll that they provide to interface with ta device however I am still trying to work out how to make it work. IRC Client - 75 pages 3728 lines. Blob crumbler (game)Backup (drag to backup + cmd line)RS232
rudi Posted December 7, 2008 Posted December 7, 2008 I am trying to use Autoit for usb communication with a HID (human interface device). I have found an USB library which should be able to do the communication (the sample app provided worked). I am currently trying to use the dll that they provide to interface with ta device however I am still trying to work out how to make it work. Some lines of YOUR code should help the experts here to help you [hint] Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
Adam1213 Posted December 7, 2008 Author Posted December 7, 2008 I am still trying to open the usb port properly - currently I am getting an error that the function does not exist within the dll (despite it being documented as being a function within that dll...)... ;http://www.autoitscript.com/forum/index.php?showtopic=83147&hl=usb ;http://www.codeproject.com/KB/cs/USB_HID.aspx?fid=398968&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2706675 ;http://www.alanmacek.com/usb/ $dll = DllOpen('UsbLibrary.dll') ; if autoit crashes the dll was not found - file available from http://www.codeproject.com/KB/cs/USB_HID.aspx const $VENDOR_ID=0483 const $PRODUCT_ID=1311 ;$struct_devinfo = DllStructCreate('int VendorId;int ProductId') $result=DllCall ($dll, 'str', ' HIDDevice', 'int', $VENDOR_ID, 'int', '') msgbox(0,'',$result&@CRLF&'error: '&@ERROR) ;$result=DllCall ($dll, 'str', 'set_VendorId', 'int', $VENDOR_ID) #cs static HIDDevice FindDevice( int nVid, int nPid, Type oType ) #ce DllClose($dll) Some lines of YOUR code should help the experts here to help you [hint] Regards, Rudi. IRC Client - 75 pages 3728 lines. Blob crumbler (game)Backup (drag to backup + cmd line)RS232
BananaFredSoft Posted June 23, 2009 Posted June 23, 2009 Please help because I need this to write a script so I can tell when the Rock Band 2 controller buttons are pressed... -ColinSite:www.bananafredsoft.comStuff:Simple Text Editor - MediaPlayer - Animator - BananaDB - BananaNotes - Chatta - Filesearch - Excuse GeneratorMy YouTube channel:http://www.youtube.com/user/colipat
AdmiralAlkex Posted June 23, 2009 Posted June 23, 2009 Please help because I need this to write a script so I can tell when the Rock Band 2 controller buttons are pressed...So what do you need help with? Is the "Rock Band 2 controller" recognised as a keyboard or game device? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
BananaFredSoft Posted June 24, 2009 Posted June 24, 2009 So what do you need help with? Is the "Rock Band 2 controller" recognised as a keyboard or game device?Game controller. I basically need to be able to read the input from a HID. -ColinSite:www.bananafredsoft.comStuff:Simple Text Editor - MediaPlayer - Animator - BananaDB - BananaNotes - Chatta - Filesearch - Excuse GeneratorMy YouTube channel:http://www.youtube.com/user/colipat
AdmiralAlkex Posted June 24, 2009 Posted June 24, 2009 (edited) Game controller. I basically need to be able to read the input from a HID.Well since it is a game device I see 2 options:Use the joystick funcs from my SDL udf. It could be a little flaky since only polling is available right now, I haven't got events working yet.Or maybe you could make something out of THIS thread where Authenticity gets input from a HID device (I believe it was a remote acting as a keyboard) Edited June 24, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now