jchd Posted May 27, 2009 Share Posted May 27, 2009 Unfortunately it does get called on input. I use the rawinput.au3 you posted and updated several time near the head of the thread. This is a very simple PNP scanner so I would expect nothing special for its interface. I don't want to abuse your time but do you have an idea what I should look or try now? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Authenticity Posted May 27, 2009 Share Posted May 27, 2009 It's ok, you're not consuming my time because it's not precious, I'll buy me a new life soon. Anyway, this HID is some sort of keyboard because if it's not a keyboard you don't need to differentiate it from the keyboard. In other words, if you'll use a keyboard hook procedure, is the handler get called from both the keyboard and the barcode scanner? Link to comment Share on other sites More sharing options...
jchd Posted May 27, 2009 Share Posted May 27, 2009 It's ok, you're not consuming my time because it's not precious, I'll buy me a new life soon. Anyway, this HID is some sort of keyboard because if it's not a keyboard you don't need to differentiate it from the keyboard. In other words, if you'll use a keyboard hook procedure, is the handler get called from both the keyboard and the barcode scanner?You're right, it behaves like a PC keyboard. Here's the complete list for this system. The barcode reader is confirmed to be the first entry. What surprises me is that there are two other entries with "Page 12, Usage 1". The handler doesn't get it either when I use the keyboard. Any (kb or barcode reader) input goes messing source in Scite instead of being trapped. In your opinion which other entry should I try? Or is there more accessible information in the registry? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Authenticity Posted May 27, 2009 Share Posted May 27, 2009 Try one of the HID UsagePage and Usage values, or in my opinion, you can try the UsagePage and Usage of keyboards which is UsagePage: 1 and Usage: 6. If the handler will be called then you're on the right track, just find a unique way to differentiate it from the normal keyboard. You can use _GetRawInputDeviceInfo() to retrieve additional information about the device while handling it's event. If you're going to use the keyboard way, change the handler body appropriately, see Kenny's code. Link to comment Share on other sites More sharing options...
jchd Posted May 28, 2009 Share Posted May 28, 2009 (edited) Try one of the HID UsagePage and Usage values, or in my opinion, you can try the UsagePage and Usage of keyboards which is UsagePage: 1 and Usage: 6. If the handler will be called then you're on the right track, just find a unique way to differentiate it from the normal keyboard. You can use _GetRawInputDeviceInfo() to retrieve additional information about the device while handling it's event. If you're going to use the keyboard way, change the handler body appropriately, see Kenny's code.OK, I'll try that it should be doable this way. I'll post the result here for future reference.Couldn't resist and tried it at once. It actually works that way, by intercepting standard keyboard (UsagePage: 1 and Usage: 6) activity. Of course, it's then easy to sort out which is which, thanks to the hDevice field.Warm thanks for your help, you can pretend to the rare title of "AutoIt King of the Barcode Reader and other HID Peripherals without having any". Edited May 28, 2009 by jchd This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
ken82m Posted June 22, 2009 Share Posted June 22, 2009 Have another challenge for you lol http://www.autoitscript.com/forum/index.php?showtopic=97184Thanks,Kenny "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
ken82m Posted June 24, 2009 Share Posted June 24, 2009 (edited) Alright for my little mouse tracking project. So I had device list scripts, and monitoring scripts. But I'm getting completely confused trying to combine them. I want to add a configure option. For example they click configure mouse 1 and then they move mouse 1 or hit a button on mouse 1 something like that. And then I record the ID and/or name, then the same for mouse 2. Now I can monitor both devices and react to each individual mouse. Here's the modified script that collects the device info I need from all mice. expandcollapse popup#include <Array.au3> #include <HIDRawInput.au3> Dim $tRIDL, $pRIDL, $iRIDL Dim $tBuff, $pBuff, $tszBuff, $pszBuff Dim $iRet, $iNumDevices = 0, $iSize = 0 Dim $tagRIDL = '' Dim $aDevices[1][2] $tRIDL = DllStructCreate($tagRAWINPUTDEVICELIST) $iRIDL = DllStructGetSize($tRIDL) Dim $iRet = _GetRawInputDeviceList(0, $iNumDevices, $iRIDL) If Not @error And $iNumDevices > 0 Then ReDim $aDevices[$iNumDevices][2] For $i = 1 To $iNumDevices $tagRIDL &= StringRegExpReplace($tagRAWINPUTDEVICELIST, '(\w+);', '${1}' & $i & ';') Next $tBuff = DllStructCreate($tagRIDL) $pBuff = DllStructGetPtr($tBuff) $iRet = _GetRawInputDeviceList($pBuff, $iNumDevices, $iRIDL) For $i = 1 To $iNumDevices If DllStructGetData($tBuff, 'dwType' & $i) <> $RIM_TYPEMOUSE Then ContinueLoop $aDevices[$i-1][0] = DllStructGetData($tBuff, 'hDevice' & $i) Next For $i = 0 To $iNumDevices-1 If DllStructGetData($tBuff, 'dwType' & $i) <> $RIM_TYPEMOUSE Then ContinueLoop $iRet = _GetRawInputDeviceInfo($aDevices[$i][0], $RIDI_DEVICENAME, '', $iSize) If $iSize > 0 Then $tszBuff = DllStructCreate('wchar[' & $iSize & ']') $pszBuff = DllStructGetPtr($tszBuff) $iRet = _GetRawInputDeviceInfo($aDevices[$i][0], $RIDI_DEVICENAME, $pszBuff, $iSize) $aDevices[$i][1] = DllStructGetData($tszBuff, 1) ConsoleWrite(DllStructGetData($tszBuff, 1) & @LF) EndIf Next $tszBuff = 0 $tBuff = 0 EndIf _ArrayDisplay($aDevices) Func OnInput($hwnd, $iMsg, $iwParam, $ilParam);Process Keyboard Input from RawInput.au3 Commands EndFunc Thanks, Kenny Edited June 24, 2009 by ken82m "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
Authenticity Posted June 24, 2009 Share Posted June 24, 2009 Heh Kenny, it's late overnight here so be easy on me been wake for the past 30+ hours on tens of cups of coffee . When you find which device handle matches which mouse, either by it's string representation or something else, you can implement it's configuration part using the same $WM_INPUT handler and differentiate it using it's device handle. If you can come up with an example code rather then listing the devices it might help. Link to comment Share on other sites More sharing options...
ken82m Posted June 26, 2009 Share Posted June 26, 2009 lol it's ok after beating my head against the wall alot I'm almost done. I'll post it when I'm done. One thing, how can I pull the "friendly" name of the mouse. I'm just using the Hex number in hDevice in my script. But I'd like something friendlier to display on the screen. When i pull the name all I get is \\acpi\kkssa\fdsf\2222.....you get the idea, How can I turn that into say "Microsoft Super Screw You PS/2 Mouse" lol "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
Authenticity Posted June 26, 2009 Share Posted June 26, 2009 (edited) It's sort of a registry key starting in:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum..and the sub-keys are for example:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_046d&Pid_c016\6&11d1f3fa&0&0000 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\RDP_KBD\0000There are a few value in the sub-keys that hold some nice values, may be helpful to you....heh Edit: In short, # is \ with the device representation string you already know. Edited June 26, 2009 by Authenticity Link to comment Share on other sites More sharing options...
John117 Posted July 17, 2009 Share Posted July 17, 2009 Try this within the OnInput() handler: ; ... ConsoleWrite(DllStructGetData($tRI_HID, 'hDevice') & @LF) ConsoleWrite(DllStructGetData($tRI_HID, 'dwCount') & @LF) ConsoleWrite(DllStructGetData($tRI_HID, 'bRawData') & @LF) ; ... If the bRawData member will return always the same value or the program will crash I think the bRawData should be declared as an array bytes in the size of dwCount. First test it, and read the RawInput.au3 file, everything is taken from MSDN and in my opinion is nicely and conveniently organized. Just so you know what I am working with here . . . Reciever: http://www.xbox.com/en-US/hardware/x/xbox360wirelessgamingreceiver/ Controller: http://www.microsoft.com/hardware/gaming/productdetails.aspx?pid=090 ChatPad: (point of post) http://www.xbox.com/en-US/hardware/x/xbox360messengerkit/ Microsoft has provided working drivers for the wireless receiver and controller. This setup can be used in many games, etc. Here is an example of an autoit user and their xbox controller UDF for review. http://www.autoitscript.com/forum/index.php?showtopic=20161&st=0&p=144402&hl=xbox%20controller&fromsearch=1&#entry144402 Here is where the issue is: The ChatPad was developed for use with the 360 and not the PC. The Controller works on both. The chat pad automatically prompts the 360 to download drivers, but does nothing on the PC. When using: expandcollapse popup#include <RawInput.au3> HotKeySet('{ESC}', '_EXIT') Global $tRIDL, $pRIDL, $iRIDL, $tagRIDL Global $tRIDI_HID, $pRIDI_HID, $iRIDI_HID Global $tRID_HID, $pRID_HID, $iRID_HID Global $tRIH, $pRIH, $iRIH Global $iNumDevices Global $hGUI $hGUI = GUICreate('Test', 100, 100) GUIRegisterMsg($WM_INPUT, 'OnInput') $tRIDL = DllStructCreate($tagRAWINPUTDEVICELIST) $iRIDL = DllStructGetSize($tRIDL) $tRIH = DllStructCreate($tagRAWINPUTHEADER) $pRIH = DllStructGetPtr($tRIH) $iRIH = DllStructGetSize($tRIH) $iNumDevices = 0 _GetRawInputDeviceList(0, $iNumDevices, $iRIDL) If @error Or $iNumDevices = 0 Then Exit $tagRIDL = '' For $i = 1 To $iNumDevices $tagRIDL &= StringRegExpReplace($tagRAWINPUTDEVICELIST, '(\w+);', '${1}' & $i & ';') Next $tRIDL = DllStructCreate($tagRIDL) $pRIDL = DllStructGetPtr($tRIDL) _GetRawInputDeviceList($pRIDL, $iNumDevices, $iRIDL) If Not @error And $iNumDevices > 0 Then For $i = 1 To $iNumDevices If DllStructGetData($tRIDL, 'dwType') = $RIM_TYPEHID Then $tRIDI_HID = DllStructCreate($tagRIDDEVICEINFO_HID) $pRIDI_HID = DllStructGetPtr($tRIDI_HID) $iRIDI_HID = DllStructGetSize($tRIDI_HID) _GetRawInputDeviceInfo(DllStructGetData($tRIDL, 'hDevice' & $i), $RIDI_DEVICEINFO, $pRIDI_HID, $iRIDI_HID) If Not @error Then $tRID_HID = DllStructCreate($tagRAWINPUTDEVICE) $pRID_HID = DllStructGetPtr($tRID_HID) $iRID_HID = DllStructGetSize($tRID_HID) DllStructSetData($tRID_HID, 'usUsagePage', DllStructGetData($tRIDI_HID, 'usUsagePage')) DllStructSetData($tRID_HID, 'usUsage', DllStructGetData($tRIDI_HID, 'usUsage')) DllStructSetData($tRID_HID, 'dwFlags', BitOR($RIDEV_INPUTSINK, $RIDEV_NOLEGACY)) DllStructSetData($tRID_HID, 'hwndTarget', $hGUI) $iNumDevices = 1 _RegisterRawInputDevices($pRID_HID, $iNumDevices, $iRID_HID) $tRID_HID = 0 EndIf $tRIDI_HID = 0 EndIf Next $tRIDL = 0 EndIf While 1 Sleep(20) WEnd Func OnInput($hwnd, $iMsg, $iwParam, $ilParam) Local $tRI_HID, $pRI_HID, $iRI_HID $tRI_KD = DllStructCreate($tagRAWINPUT_HID) $pRI_KD = DllStructGetPtr($tRI_HID) $iRI_KB = DllStructGetSize($tRI_HID) _GetRawInputData($ilParam, $RID_INPUT, $pRI_HID, $iRI_HID, $iRIH) If Not @error Then ConsoleWrite(DllStructGetData($tRI_HID, 'hDevice') & @LF) ConsoleWrite(DllStructGetData($tRI_HID, 'dwType') & @LF) ConsoleWrite(DllStructGetData($tRI_HID, 'bRawData') & @LF) EndIf $tRI_HID = 0 Return 'GUI_RUNDEFMSG' EndFunc Func _EXIT() GUIDelete() Exit EndFunc I get something similar to this 0x00020393 1 0 0x00020393 1 0 -my first numbers are a little different (I’m not at home so I can’t use the controller to get the correct numbers) –but they are always identical to eachother followed by a 1 and 0 This is when I press a controller button. When I press a chat pad botton I get nothing. Also I get none of the other info the origional poster mentioned. Such as how to get the usage and usagepage. Also, because this is one device connected to a second device, I am guessing they would both have to be registered? I will test any ideas you have tonight. Can this be done without a driver for the chat pad? Link to comment Share on other sites More sharing options...
boogieoompa Posted August 5, 2009 Share Posted August 5, 2009 In regards to http://www.autoitscript.com/forum/index.php?showtopic=99263 Authenticity asked me to post in here.... OK so this seemed to kind of work. For those who did not read the last thread my goal was to capture input from an HID device and remap it. In this case remaping "a" to "j" whenever the computer recieves an "a" from the HID. The problem at the moment is it is not accepting a from the keyboard since the send command is traping it again. Is there a more elequant way of performing this task or is there a way around the send loop? thanks in advance expandcollapse popup#include <RawInput.au3> HotKeySet('{ESC}', '_EXIT') HotKeySet("a", "FuncTrap") Global $tRID_KD, $pRID_KD, $iRID_KD Global $tRIH, $pRIH, $iRIH Global $iNumDevices Global $hGUI , $pData $hGUI = GUICreate('Test', 100, 100) GUIRegisterMsg($WM_INPUT, 'OnInput') $tRID_KD = DllStructCreate($tagRAWINPUTDEVICE) $pRID_KD = DllStructGetPtr($tRID_KD) $iRID_KD = DllStructGetSize($tRID_KD) $tRIH = DllStructCreate($tagRAWINPUTHEADER) $pRIH = DllStructGetPtr($tRIH) $iRIH = DllStructGetSize($tRIH) $iNumDevices = 1 DllStructSetData($tRID_KD, 'usUsagePage', 0x01) DllStructSetData($tRID_KD, 'usUsage', 0x06) DllStructSetData($tRID_KD, 'dwFlags', BitOR($RIDEV_NOLEGACY, $RIDEV_INPUTSINK)) DllStructSetData($tRID_KD, 'hwndTarget', $hGUI) _RegisterRawInputDevices($pRID_KD, $iNumDevices, $iRID_KD) While 1 Sleep(20) WEnd Func FuncTrap() EndFunc Func FuncSend() send("j") EndFunc Func FuncSend2() send("a") EndFunc Func OnInput($hwnd, $iMsg, $iwParam, $ilParam) Local $tRI_KD, $pRI_KD, $iRI_KB Local $tRIDI_HID, $pRIDI_HID, $iRIDI_HID Local $hDevice $tRI_KD = DllStructCreate($tagRAWINPUT_KEYBOARD) $pRI_KD = DllStructGetPtr($tRI_KD) $iRI_KB = DllStructGetSize($tRI_KD) $tRIDI_HID = DllStructCreate($tagRIDDEVICEINFO_HID) $pRIDI_HID = DllStructGetPtr($tRIDI_HID) $iRIDI_HID = DllStructGetSize($tRIDI_HID) DllStructSetData($tRIDI_HID, 'cbSize', $iRIDI_HID) _GetRawInputData($ilParam, $RID_INPUT, $pRI_KD, $iRI_KB, $iRIH) If Not @error Then $hDevice = DllStructGetData($tRI_KD, 'hDevice') ConsoleWrite($hDevice & @LF) ConsoleWrite(DllStructGetData($tRI_KD, 'VKey') & @LF) ConsoleWrite(DllStructGetData($tRI_KD, 'hDevice') & @LF) _GetRawInputDeviceInfo($hDevice, $RIDI_DEVICEINFO, $pRIDI_HID, $iRIDI_HID) If $hDevice = 0x0190016B Then ; ClipPut ($hDevice&","& $RIDI_DEVICEINFO&","& $pRIDI_HID&","& $iRIDI_HID) FuncSend() ; Msgbox(0,"Hoorah", DllStructGetData($tRI_KD, 'hDevice') ) Else FuncSend2() EndIf EndIf $tRI_KD = 0 Return 'GUI_RUNDEFMSG' EndFunc Func _EXIT() GUIDelete() Exit EndFunc Link to comment Share on other sites More sharing options...
SagePourpre Posted May 6, 2010 Share Posted May 6, 2010 Very interesting subject. I'm just beginning to figure out how to make it work but I love this piece of code enough to pop that subject up after 1 year of inactivity Link to comment Share on other sites More sharing options...
SagePourpre Posted May 7, 2010 Share Posted May 7, 2010 I would have a question... Is it possible to get the "Handle to the RAWINPUT structure" that lparam provide in WM_INPUT but in the keyproc function. I need the 'hdevice' before WM_INPUT so I can decide accordingly to the HID keyboard that performed the action if : - I want to perform default action (ex : Typing letter 'q' will output 'q' - I want to perform something totally different (ex : Typing letter 'q' from second 'hdevice' actually perform a function) expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <RawInput.au3> #include <WinAPI.au3> #Include <WindowsConstants.au3> HotKeySet('{ESC}', '_EXIT') Global $tRID_KD, $pRID_KD, $iRID_KDj Global $tRIH, $iRIH Global $iNumDevices Global $hGUI Global $sHexKeys, $sMouse, $sString, $hHookKeyboard, $pStub_KeyProc $hGUI = GUICreate('Test', 100, 100) GUIRegisterMsg($WM_INPUT, 'OnInput') $pStub_KeyProc = DllCallbackRegister("_KeyProc", "int", "int;ptr;ptr") $hHookKeyboard = _WinAPI_SetWindowsHookEx($WH_KEYBOARD_LL, DllCallbackGetPtr($pStub_KeyProc), _WinAPI_GetModuleHandle(0), 0) $tRID_KD = DllStructCreate($tagRAWINPUTDEVICE) $pRID_KD = DllStructGetPtr($tRID_KD) $iRID_KD = DllStructGetSize($tRID_KD) $tRIH = DllStructCreate($tagRAWINPUTHEADER) $iRIH = DllStructGetSize($tRIH) $iNumDevices = 1 DllStructSetData($tRID_KD, 'usUsagePage', 0x01) DllStructSetData($tRID_KD, 'usUsage', 0x06) DllStructSetData($tRID_KD, 'dwFlags', BitOR($RIDEV_NOLEGACY, $RIDEV_INPUTSINK)) DllStructSetData($tRID_KD, 'hwndTarget', $hGUI) _RegisterRawInputDevices($pRID_KD, $iNumDevices, $iRID_KD) While 1 Sleep(20) WEnd GUIDelete() Func _EXIT() GUIDelete() DllCallbackFree($pStub_KeyProc) _WinAPI_UnhookWindowsHookEx($hHookKeyboard) Exit EndFunc Func OnInput($hwnd, $iMsg, $iwParam, $ilParam) Local $tRI_KD, $pRI_KD, $iRI_KB Local $iSize $tRI_KD = DllStructCreate($tagRAWINPUT_KEYBOARD) $pRI_KD = DllStructGetPtr($tRI_KD) $iRI_KB = DllStructGetSize($tRI_KD) _GetRawInputData($ilParam, $RID_INPUT, $pRI_KD, $iRI_KB, $iRIH) If Not @error Then ConsoleWrite(DllStructGetData($tRI_KD, 'Message') & @LF) ConsoleWrite(DllStructGetData($tRI_KD, 'VKey') & @LF) ConsoleWrite(DllStructGetData($tRI_KD, 'hDevice') & @LF) EndIf $tRI_KD = 0 Return 'GUI_RUNDEFMSG' EndFunc Func _KeyProc($nCode, $wParam, $lParam) If $nCode < 0 Then Return _WinAPI_CallNextHookEx($hHookKeyboard, $nCode, $wParam, $lParam) Local $KBDLLHOOKSTRUCT = DllStructCreate("dword vkCode;dword scanCode;dword flags;dword time;ptr dwExtraInfo", $lParam) Local $vkCode = DllStructGetData($KBDLLHOOKSTRUCT, 'vkCode') ConsoleWrite($vkCode & @CRLF) Switch $wParam Case $WM_KEYDOWN, $WM_SYSKEYDOWN If $vkCode = 0x41 Then ;_keybd_event(0x61, 0) ; Return -1 EndIf EndSwitch Return _WinAPI_CallNextHookEx($hHookKeyboard, $nCode, $wParam, $lParam) EndFunc ;==>_KeyProc ;Func _keybd_event($vkCode, $Flag) ; DllCall('user32.dll', 'int', 'keybd_event', 'int', $vkCode, 'int', 0, 'int', $Flag, 'ptr', 0) ;EndFunc; _keybd_event I'll post back if I find something useful. Link to comment Share on other sites More sharing options...
malu05 Posted June 29, 2010 Share Posted June 29, 2010 You need to assign to struct size to the cbSize member of the struct, then you'll use this size also in the function call: ;. ;.. ;... $tRI_KD = 0 $tRI_KD = DllStructCreate($tagRID_DEVICE_INFO_HID) $pRI_KD = DllStructGetPtr($tRI_KD) $iRI_KB = DllStructGetSize($tRI_KD) DllStructSetData($tRI_KD, 'cbSize', $iRI_KD) ; 8) _GetRawInputDeviceInfo($ilParam, $RIDI_DEVICEINFO, $pRI_KD, $iRI_KB) ; Was $hwnd 8) If Not @error Then ConsoleWrite(DllStructGetData($tRI_KD, 'dwVendorId') & @CR) MsgBox(0, "dwVendorId", DllStructGetData($tRI_KD, 'dwVendorId') ) EndIfoÝ÷ Ù±ßÛN¼+,r¸©µ©ízYfz'ò¢çǶzwh¬Oj±¨z׺Ú"µÍÚ[ÛYH Ô]Ò[]]LÉÝÂ[H ÌÍÝQ ÌÍÚTQ[H ÌÍÝY ÌÍÜY[H ÌÍÝQWÓSÕTÑK ÌÍÜQWÓSÕTÑK ÌÍÚTQWÓSÕTÑB[H ÌÍÝQWÒÑVPÐT ÌÍÜQWÒÑVPÐT ÌÍÚTQWÒÑVPÐT[H ÌÍÝQWÒQ ÌÍÜQWÒQ ÌÍÚTQWÒQ[H ÌÍÝYÔQ[H ÌÍÚS[Q]XÙÂÌÍÝQHÝXÝÜX]J ÌÍÝYÔUÒSUUPÑSTÕ BÌÍÚTQHÝXÝÙ]Ú^J ÌÍÝQ BÌÍÝYÔQH ÌÎNÉÌÎNÂÑÙ]]Ò[]]XÙSÝ ÌÍÚS[Q]XÙË ÌÍÚTQ BYÝÜ[ ÌÍÚS[Q]XÙÈ ÝÈ[QÜ ÌÍÚHHÈ ÌÍÚS[Q]XÙËLBBIÌÍÝYÔQ [ÏHÝ[ÔYÑ^XÙJ ÌÍÝYÔUÒSUUPÑSTÕ ÌÎNÊ ÌLÝÊÊNÉÌÎNË ÌÎNÉÌÍÞÌ_IÌÎNÈ [È ÌÍÚH [È ÌÎNÎÉÌÎNÊBS^IÌÍÝYHÝXÝÜX]J ÌÍÝYÔQ BIÌÍÜYHÝXÝÙ] ÌÍÝYBWÑÙ]]Ò[]]XÙSÝ ÌÍÜY ÌÍÚS[Q]XÙË ÌÍÚTQ BRYÝÜ[BQÜ ÌÍÚHHÈ ÌÍÚS[Q]XÙËLBBBTÝÚ]ÚÝXÝÙ]]J ÌÍÝY ÌÎNÙÕIÌÎNÈ [È ÌÍÚJBBBBPØÙH ÌÍÔSWÕTSSÕTÑBBBBBIÌÍÝQWÓSÕTÑHHÝXÝÜX]J ÌÍÝYÔQUPÑRS×ÓSÕTÑJBBBBBIÌÍÜQWÓSÕTÑHHÝXÝÙ] ÌÍÝQWÓSÕTÑJBBBBBIÌÍÚTQWÓSÕTÑHHÝXÝÙ]Ú^J ÌÍÝQWÓSÕTÑJBBBBBQÝXÝÙ]]J ÌÍÝQWÓSÕTÑK ÌÎNØØÚ^IÌÎNË ÌÍÚTQWÓSÕTÑJBBBBBQÝXÝÙ]]J ÌÍÝQWÓSÕTÑK ÌÎNÙÕIÌÎNË ÌÍÔSWÕTSSÕTÑJBBBBBBBBBBWÑÙ]]Ò[]]XÙR[ÊÝXÝÙ]]J ÌÍÝY ÌÎNÚ]XÙIÌÎNÈ [È ÌÍÚJK ÌÍÔQWÑUPÑRSË ÌÍÜQWÓSÕTÑK ÌÍÚTQWÓSÕTÑJBBBBBPÛÛÛÛUÜ]JÑÙ]]XÙR[Ê ÌÍÝQWÓSÕTÑJH [ÈBBBBBIÌÍÝQWÓSÕTÑHHBBBBBBBBPØÙH ÌÍÔSWÕTRÑVPÐTBBBBIÌÍÝQWÒÑVPÐTHÝXÝÜX]J ÌÍÝYÔQUPÑRS×ÒÑVPÐT BBBBBIÌÍÜQWÒÑVPÐTHÝXÝÙ] ÌÍÝQWÒÑVPÐT BBBBBIÌÍÚTQWÒÑVPÐTHÝXÝÙ]Ú^J ÌÍÝQWÒÑVPÐT BBBBBQÝXÝÙ]]J ÌÍÝQWÒÑVPÐT ÌÎNØØÚ^IÌÎNË ÌÍÚTQWÒÑVPÐT BBBBBQÝXÝÙ]]J ÌÍÝQWÒÑVPÐT ÌÎNÙÕIÌÎNË ÌÍÔSWÕTRÑVPÐT BBBBBBBBBBWÑÙ]]Ò[]]XÙR[ÊÝXÝÙ]]J ÌÍÝY ÌÎNÚ]XÙIÌÎNÈ [È ÌÍÚJK ÌÍÔQWÑUPÑRSË ÌÍÜQWÒÑVPÐT ÌÍÚTQWÒÑVPÐT BBBBBPÛÛÛÛUÜ]JÑÙ]]XÙR[Ê ÌÍÝQWÒÑVPÐT H [ÈBBBBBIÌÍÝQWÒÑVPÐTHBBBBBBBBPØÙH ÌÍÔSWÕTRQBBBBIÌÍÝQWÒQHÝXÝÜX]J ÌÍÝYÔQUPÑRS×ÒQ BBBBBIÌÍÜQWÒQHÝXÝÙ] ÌÍÝQWÒQ BBBBBIÌÍÚTQWÒQHÝXÝÙ]Ú^J ÌÍÝQWÒQ BBBBBQÝXÝÙ]]J ÌÍÝQWÒQ ÌÎNØØÚ^IÌÎNË ÌÍÚTQWÒQ BBBBBQÝXÝÙ]]J ÌÍÝQWÒQ ÌÎNÙÕIÌÎNË ÌÍÔSWÕTRQ BBBBBBBBBBWÑÙ]]Ò[]]XÙR[ÊÝXÝÙ]]J ÌÍÝY ÌÎNÚ]XÙIÌÎNÈ [È ÌÍÚJK ÌÍÔQWÑUPÑRSË ÌÍÜQWÒQ ÌÍÚTQWÒQ BBBBBPÛÛÛÛUÜ]JÑÙ]]XÙR[Ê ÌÍÝQWÒQ H [ÈBBBBBIÌÍÝQWÒQHBBQ[ÝÚ]ÚBS^BBBIÌÍÝYHQ[Y[Y[ÈÑÙ]]XÙR[ÊTY ÌÍÝÝXÝ BSØØ[ ÌÍÜÓÙÂBTÝÚ]ÚÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÕIÌÎNÊBBPØÙH ÌÍÔSWÕTSSÕTÑBBBIÌÍÜÓÙÈH ÌÎNËS[ÝÙH[ÎÌÎNÈ [È [ÈP [È ÌÎNÒQ ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÒY ÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÓ[XÙ]ÛÎ ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÓ[XÙ]ÛÉÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÔØ[H]N ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÔØ[T]IÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÒÜ^Û[ÚY[ ÌÎNÂBBRYÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÒÜ^Û[ÚY[ ÌÎNÊH[BBBIÌÍÜÓÙÈ [ÏH ÌÎNÔÙ[ ÌÎNÂBBQ[ÙBBBBIÌÍÜÓÙÈ [ÏH ÌÎNÓÝÙ[ ÌÎNÂBBQ[YBBIÌÍÜÓÙÈ [ÏH [È ÌÎNËOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIÌÎNÈ [ÈBBBBPØÙH ÌÍÔSWÕTRÑVPÐTBBIÌÍÜÓÙÈH ÌÎNËRÙ^XØ[ÎÌÎNÈ [È [ÈP [È ÌÎNÒÙ^XØN ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÕIÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÒÙ^XØÝXN ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÔÝXIÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÒÙ^XØ[ÙN ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÒÙ^XØ[ÙIÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÓ[XÙ[Ý[ÛÙ^Î ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÓ[XÙ[Ý[ÛÙ^ÉÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÓ[XÙQ[XØ]ÜÎ ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÓ[XÙ[XØ]ÜÉÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÕÝ[[XÙÙ^Î ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÓ[XÙÙ^ÕÝ[ ÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏH ÌÎNËOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIÌÎNÈ [ÈBBBBPØÙH ÌÍÔSWÕTRQBBIÌÍÜÓÙÈH ÌÎNËRQ[ÎÌÎNÈ [È [ÈP [È ÌÎNÕ[ÜQ ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÕ[ÜY ÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÔÙXÝQ ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÔÙXÝY ÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÕÚ[Û[X ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÙÕÚ[Û[XÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÕÜ[][ÛÛXÝ[ÛØYÙHYÙN ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÝÕØYÙTYÙIÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏHP [È ÌÎNÕÜ[][ÛÛXÝ[ÛØYÙN ÌÎNÈ [ÈÝXÝÙ]]J ÌÍÝÝXÝ ÌÎNÝÕØYÙIÌÎNÊH [ÈBBIÌÍÜÓÙÈ [ÏH ÌÎNËOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIÌÎNÈ [ÈQ[ÝÚ]ÚBT] ÌÍÜÓÙÂ[[ wtf? [center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center] Link to comment Share on other sites More sharing options...
af3m1a Posted July 29, 2010 Share Posted July 29, 2010 thanks, i will evaluate this solution.... Link to comment Share on other sites More sharing options...
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