AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DLLCall: Support for Human Interface devices
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
beermatt
Guest





PostPosted: Wed Aug 23, 2006 12:14 am    Post subject: Reply with quote

Micha wrote:
Hi,
I've uploaded version 1.01.
You can receive the devicenumber which generates an event.
Please have a look at the sample-script.
Many thanks Micha - in my excitement I initially overlooked the following messages (about mfc dll files) and wondered why it didn't work.. Embarassed
Once I'd installed them it appears to work fine (by copying and modifying the code in the sample script which is different to your post above i.e. using DllCall GetNumberFromHandle rather than an additional parameter in DllCall GetWM_INPUTHIDData).

Many thanks Exclamation

Matt
Back to top
Kellianjaxon
Guest





PostPosted: Mon Sep 18, 2006 5:47 pm    Post subject: Reply with quote

First of all, thanks to Micha for making it possible to reprogram HIDs. Awesome work!

I'm having a few problems with my Logitech UltraX Media Remote, though. There are couple of buttons the "Vals" of which seem to be changing depending on the order of buttons pressed. I noticed this behaviour quite soon once I started trying to reprogram the remote.

Here's an example:

There's a button labeled Home that creates Vals 54480000 when pushed down right after the RemoteControl.ahk script has been loaded. If I push the button next to Home (= labeled Close), it gives me Vals 51535352. Now that I repush Home, I'll get 54480052.

After some experimenting it seems that four different buttons seem to get the last two digits (in previous example "52") from the button previously pressed. The funny thing is that this behaviour doesn't occur with all the buttons which at first made me believe the problem is in my remote. On the other hand I find it hard to believe that some buttons would be initially programmed by Logitech to react different ways dependable on the order.

I wonder if it's something I've to live with or if there's some way to tweak the code to reliably recognize the problematic buttons. Unfortunately I'm not experienced enough myself to participate in coding, just wanted to bring up the issue.

Should this become resolved, I can finish the PDF document I've made plus few other files - all about reprogramming UltraX Media Remote, upload them somewhere and post the link here for others to enjoy, too.
Back to top
dhrto
Guest





PostPosted: Fri Sep 22, 2006 4:59 pm    Post subject: Reply with quote

Hi there.

I too have experimenting with Mischa's dll and the UltraX remote. And I've run into the same situation as Kellianjaxon. Here's how I tackled the problem: note down the different Vals for the same button and just make it refer to the same sub in the script. Hope this helps.
Back to top
grom
Guest





PostPosted: Tue Oct 03, 2006 12:20 am    Post subject: Reply with quote

Hi!

On my system the script generates the same error ( GetDeviceCount fehlgeschlagen. Errorcode: -3) after installing all these Visual C++ dlls. Dependancy Walker creates the following Warning about mpr.dll: At least one module has an unresolved import due to a missing export function in a delay-load dependent module. Could you explain what does this error mean and how to prevent it?
Back to top
Micha



Joined: 15 Nov 2005
Posts: 437
Location: Germany

PostPosted: Mon Oct 09, 2006 11:50 am    Post subject: Reply with quote

Hi Kellianjaxon and dhrto,
I will have a look if I can find the problem.
Sorry but it can last a little bit. I have to sort 2100 pictures of our honeymoon and about 11 hours of video to cut from Kenya Smile
But I will not forget to find this error / problem Smile

Hi grom,
mpr.dll is red and this is "ok" in the helpfile of dependency walker this is explained. If it still doesn't work please read the posts of the thread:
http://www.autohotkey.com/forum/viewtopic.php?t=8365&start=0&postdays=0&postorder=asc

Most users does not have the correct dlls or something is missing. Please verify that you have ALL dlls at the correct places.
If it still does not work, please install the VCRedist-Files mentioned in the thread
Ciao
Micha
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Mon Oct 09, 2006 12:25 pm    Post subject: Reply with quote

Quote:
I have to sort 2100 pictures of our honeymoon
CoolCngrats!Very HappyCoolVery HappyVery HappySmile
Back to top
holomind



Joined: 11 Mar 2006
Posts: 300
Location: Munich, Germany

PostPosted: Mon Oct 09, 2006 12:34 pm    Post subject: Reply with quote

BoBo wrote:
Quote:
I have to sort 2100 pictures of our honeymoon
CoolCngrats!Very HappyCoolVery HappyVery HappySmile


then you could have use of this:
http://www.cs.umd.edu/hcil/photomesa/

very cool way to find and categorize your images, seems you have lots of them Wink
Back to top
View user's profile Send private message Visit poster's website
timtyler



Joined: 01 Jan 2007
Posts: 17

PostPosted: Wed Jan 10, 2007 3:00 pm    Post subject: 2 keypads: is the returned DeviceHandle different? Reply with quote

This thread is a bit technical Neutral

I have some questions about whether this can be used to
distinguish between additional numeric keypads.

Has anyone tried this? Is the returned DeviceHandle different
between different keypads? What about keypads that are
otherwise totally identical? Is the DeviceHandle persistent
across reboots, and across rearranging USB devices?

As has been discussed elsewhere, it would be great to be
able to address different keypads as different devices, without
having to spend the extra money on programmable keyboards.
--
__________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
_________________
--
__________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
Back to top
View user's profile Send private message
Micha



Joined: 15 Nov 2005
Posts: 437
Location: Germany

PostPosted: Wed Jan 10, 2007 6:26 pm    Post subject: Re: 2 keypads: is the returned DeviceHandle different? Reply with quote

Hi timtyler,

timtyler wrote:
This thread is a bit technical Neutral

Well, yes it is, because the Windows-API for that is difficult Smile

I haven't tried different keypads. I only own the one on my standard-keyboard Smile
And I do not have two identical devices to test the behavior of windows.
The dll only wrapes the api for ahk. The behavior depends on windows.

Therefore I can't give you any hints.
You have to try and hopefully didn't fail.
Ciao
Micha
Back to top
View user's profile Send private message
dan gii



Joined: 16 Jan 2007
Posts: 1

PostPosted: Sat Jan 20, 2007 6:32 am    Post subject: can someon help me? Reply with quote

hey, im new to AutoHotkey and scripting all together... I managed to turn my Wingman Joypad into a Transport Controller for my music program though, but that was mostly looking at other resources available and modifying a little... must say, champion effort for creating this program and all the hard work along with it... especially the interaction with the users on the forum...

i was wondering if anyone can help me, ive got the "AutoHotkeyRemoteControlDLL.ahk" running at the moment and I want to get Two Keyboards to act independantly...

i want to use one to control functions in Ableton Live which can have key combinations set, like Ctrl+1 to record on the first track...

the other i want to use just as a normal keyboard

i get messages from two different devices when I register one of the Keyboards in the "AutoHotkeyRemoteControlDLL.ahk" gui. So at the moment, when i register one of the keyboards listed and I hit A on device 3 i get exactly the same messages in the area bellow when I hit A on device 5 (both are keyboards).

So basically, I want device 3 to be the keyboard I assign to controls like Ctr+1 etc. and I want device 5 just to be the normal keyboard....

Can anyone help with with the beggining of a script, even just to show me how i might map my keyboard on device 3 to have say the "1" key map to ctrl+1, the "Q" key to ctrl+q and maybe one of the function keys "F1" to map to ctrl+F

i would be so appreciative as this would get me further than where im at now and i could start mapping the rest of the keys as required.

think its possible?

thanks for reading.

dan.
Back to top
View user's profile Send private message
Barney9



Joined: 02 Mar 2007
Posts: 9

PostPosted: Fri Mar 02, 2007 8:11 pm    Post subject: Reply with quote

Hi all!

I am using this script with my Logitech Mouse. I had to uninstall the Logitech drivers first in order to get the script receive events from all buttons. Unfortunately I receive the same codes for some buttons. So my script can't differ which button was pressed. I wonder how the Logitech software was able to differ the buttons.

Has somebody an idea how I can get it working?
Back to top
View user's profile Send private message
Tim Tyler
Guest





PostPosted: Sat Mar 03, 2007 11:27 am    Post subject: Reply with quote

I tried it. Apparently I have 22 HID devices Wink

After adding code in the demo script to print %DeviceNumber%,
I was mostly able to distinguish between the same key being pressed
on three different numeric keypads.

This is /potentially/ good news for those wanting a cheap way to obtain extra programmable keys - /without/ splashing out on a programmable keyboard.

However, the value returned in %DeviceNumber% proved not to be 100% reliable. I /suspect/ this is not a show-stopping problem -
but it looks like it may well be an irritation.

I have not explored what happens to %DeviceNumber% when the
machine is rebooted, or when USB devices are plugged/unplugged.

I also tried an unprogrammed X-Keys device. No juice - keypresses
produced no response.
--
_________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
Back to top
Tim Tyler
Guest





PostPosted: Sat Mar 03, 2007 11:38 am    Post subject: Reply with quote

Tim Tyler wrote:

However, the value returned in %DeviceNumber% proved not to be 100% reliable. I /suspect/ this is not a show-stopping problem -
but it looks like it may well be an irritation.


To clarify, eack keypress produces two events. One always has the 'correct' device number. The other sometimes produces 0.
0 can be produced on either event. It happens about one time in twenty.

So: not a show-stopper - but a bit of an irritation.
--
_________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
Back to top
Tim Tyler
Guest





PostPosted: Sat Mar 03, 2007 1:55 pm    Post subject: Reply with quote

Tim Tyler wrote:
I have not explored what happens to %DeviceNumber% when the
machine is rebooted, or when USB devices are plugged/unplugged.


I plugged in a new USB keyboard. The PS/2 numeric keypad kept its %DeviceNumber% - but the %DeviceNumber% of all the other USB devices shuffled around.
--
________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
Back to top
XavierGr



Joined: 15 Jul 2006
Posts: 42

PostPosted: Sat Mar 03, 2007 5:28 pm    Post subject: Reply with quote

Though it's been some time since this script was created, I would like some help.

Is there anyway to filter the data per device number?
E.g If I register for HID devices then I will get data from multiple devices.
Because I have a wireless keyboard and mouse (different brand) but they use the same UserPage number. So when I register one HID device I get data from 4 different HID devices (mouse and keyboard has 2 HID devices each)

Also is there any reason I get tons of data even when I don't press a button on the device?
I suspect that because they are wireless I get the transmission data even if there is no activity on them.

So far I can't manage to get the script to work, there is so much data coming in and pressing the buttons gives varying results every time I test it, though it must be that I am reading the wrong data.
_________________
One hotkey to rule them all!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 3 of 7

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group