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, 8, 9, 10  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Musictype



Joined: 21 Jul 2008
Posts: 1

PostPosted: Mon Jul 21, 2008 1:48 am    Post subject: Reply with quote

I've cobbled together my first script, to allow playback of BluRay from the Vista Media Center main menu, by using PowerDVD.

In the script, I want PowerDVD to close, when the BACK button on the MCE Remote is pressed.

The keyboard shortcut equivalent is BACKSPACE and I've put this in the script, but the remote sends something else.

I ran AutoHotkeyRemoteControlDLL and got this for the BACK button on the MCE Remote:

Device:4-Size:3 -> RawData: ->02<-->00<-->00<-
Device:4-Size:3 -> RawData: ->02<-->24<-->02<-

But I am not sure how to integrate this info into the script. Where should I place it?

Here is the script:

Code:
; Start sequence
IfWinNotExist, CyberLink PowerDVD
{
WinActivate, Windows Media Center

Run "C:\Program Files\CyberLink\PowerDVD8\PowerDVD8.exe" \FULSCREEN
WinActivate, CyberLink PowerDVD
WinMaximize

Sleep, 2500
WinMinimize, Windows Media Center
WinActivate, CyberLink PowerDVD
}
else
{
WinActivate, Windows Media Center

Sleep, 1000
WinMinimize, Windows Media Center
WinActivate, CyberLink PowerDVD
}
return




Backspace::
IfWinExist, CyberLink PowerDVD
{

IfWinNotExist, Windows Media Center
{
Run C:\Windows\ehome\ehshell.exe
}

Sleep, 1000
;WinRestore , Windows Media Center
Run C:\Windows\ehome\ehshell.exe
WinClose, CyberLink PowerDVD
ExitApp
}

IfWinExist, MediaPortal
{
Send, , Backspace, C:\Windows\ehome\ehshell.exe
}
return



Thanks!
Back to top
View user's profile Send private message
blackdaemon



Joined: 17 Jan 2007
Posts: 1

PostPosted: Mon Aug 04, 2008 10:09 am    Post subject: Griffin Powermate volume control Reply with quote

Thank you for such great addition, Micha!

I have been able to program Griffin Powermate volume control using your HID DLL in no time.
Finally, I could get the correct functionality from the device, which due to some problem in the original driver was not working for me.
Now that volume knob is not just decorating my desk, but actually doing something useful Laughing

I can post the code here, if anybody is having the same problem. This is specific only for
alternate Windows shells, where the Griffin's driver seems to have problem accessing the
sound mixer.

Greetings
Back to top
View user's profile Send private message
Xapti
Guest





PostPosted: Fri Aug 22, 2008 6:24 am    Post subject: Reply with quote

I am using this product:
http://www.sandiotech.com/sandio_product.php
(it is a mouse with 3 DIGITAL joysticks)

When running this script, I get a mouse and HID which seem to be registered to it. (well two mice, two keyboards, and HID, but doesn't seem to matter which keyboard or mouse i have registered)

For mouse, it registers standard 5 buttons (3rd is scrollwheel), HID is mentioned at the bottom of post.

The mouse lets me bind directions to keys, so that part isn't really an issue (except it spams them at a rate of one press every 10ms direction is held down! - I would like a fix for this [debouncer, sorta])

What I want to use, is the pressing in of the joysticks (like the pressing in of the scrollwheel) to be mapped to something, which the software/driver does not allow. The only one that does anything (which is uncustomizable, just like button 4 and 5, lol - thankfully I have autohotkeys) is pushing in the middle stick, which simulates pressing mouse4 and mouse5 at the same time.

I would like to figure out how to use pushing in of the other two sticks, but this is not being detected in Michas script.
On HID, michas script doesn't register any actions, except if i move the middle joystick. No matter the direction pressed, every - let's say 10ms - it returns a seemingly random byte every time, the last one always being 00 though.

Device:0-Size:8 -> RawData: ->00<-->ac<-->01<-->00<-->00<-->00<-->00<-->00<-
Device:0-Size:8 -> RawData: ->00<-->ac<-->01<-->77<-->00<-->00<-->00<-->00<-
Device:0-Size:8 -> RawData: ->00<-->ac<-->01<-->62<-->00<-->00<-->00<-->00<-
Device:0-Size:8 -> RawData: ->00<-->ac<-->01<-->c7<-->00<-->00<

but as I've said, I'm only looking to map pressing of the 2 joysticks.
I'm thinking it's possible that they aren't even used, like the switches attached to the other 2 joystick pressings aren't wired to anything, or at least don't return any signal... Sad
Back to top
Xapti
Guest





PostPosted: Fri Aug 22, 2008 6:39 am    Post subject: Reply with quote

I think my problem can just be ignored, I think there isn't any way of using the other two sticks (or really the middle stick either, without conflicting with button 4 and 5) for this reason

-nothing show up on a test program that comes with the mouse, that shows the binary code for button presses (not the joystick movements though, those were separate), like micha's except in binary instead of decimal.

-micha's doesn't detect it either (this is on the mouse registered), it was just less obvious to me, because it was in decimal, which doesn't really make sense, but whatever.
Back to top
n-l-i-d
Guest





PostPosted: Sat Aug 23, 2008 1:17 pm    Post subject: Reply with quote

To be able to know which HID device you are seeing with the AutoHotkeyRemoteControlDLL.ahk script ...

Micha on autohotkey.net wrote:
If you don't know, which device is your remote control, try to register all entries one by one and press a key on your remote control to see, if it is recognized.


... I found these:

Online database DriverAgent, which gives me in the case of the example screenshot on/from Micha's autohotkey.net page: vendor = Topseed, product = unknown
Single file on linux-usb.org, which gives me the same info



HTH
________________________________________________________
New here? Please, before you post...
1. Read the tutorial and try the examples. -> 2. Take a look at the command list to get an idea of what you could do. -> 3. Create your script. Consult the documentation and the FAQ if you get stuck. -> 4. Search the forum if you need help or examples, method 1 (forum), method 2 (site), method 3 (Google). -> 5. Post your code on the forum in the "Ask for Help" section if you still run into problems (but read this first). -> 6. There is more AHK on autohotkey.net and the Wiki and there is an AHK IRC chat.
Back to top
Thunderess



Joined: 23 Aug 2008
Posts: 4

PostPosted: Sun Aug 24, 2008 10:16 am    Post subject: Reply with quote

The autohotkeyremotecontrol program doesn't recognize my Fn key under any of the entries.

I have a Dell XPS M1730. I have to press 'Fn + PauseBreak' to get Company of Heroes game to pause. The PauseBreak key is on my F12 key, so that is why I have to hit the Fn key with it. So, been trying to make pausing the game to the space bar and it just isn't working.

Is there anything else I could do to get this to work?
Back to top
View user's profile Send private message
bcolin



Joined: 27 Aug 2008
Posts: 3

PostPosted: Thu Aug 28, 2008 2:04 pm    Post subject: Reply with quote

Hey i have aspire 8920 (acer) and i cant find my 'Fn' key and also not these touch keys Crying or Very sad Crying or Very sad




how i can find the touch keys / Fn key ?

thx !
Back to top
View user's profile Send private message
TheLeO



Joined: 11 Jun 2005
Posts: 203
Location: England ish

PostPosted: Sat Sep 06, 2008 8:26 pm    Post subject: Reply with quote

I'm trying to use this with my xbox 360 wired usb joypad(made my madcatz). In order to pick up the "X" button.

but the messege only changes when i rotate the left thumbpad, and it does not change by pressing buttons, or pulling the triggers.

does any one know about this?
_________________
And i say: where there is a problem , there is a solution.(well some where that is.)
::
I Have Spoken
::
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Brad
Guest





PostPosted: Tue Sep 23, 2008 11:17 pm    Post subject: Reply with quote

OK, I'm totally lost...

Using Vista Home Premium and a Harmony 550 remote, transmitting into a Microsoft MCE Remote Receiver, hooked up via USB.

I want to map the Harmony's equivalents to the Microsoft MCE Remotes "My PIctures" and "My VIdeos" to AHK scripts.

If I try to run AutoHotkeyRemoteControlDLL.ahk , I get an error reading "GetDeviceCount fehlgeschlagen. ErrorCode -3."

I have the mfc80 DLLs, the AutoHotkeyRemoteControlDLL.ahk file, and AutoHotkeyRemoteControl.dll all in the same folder.

Any clues for an obvious newbie?
Back to top
Brad
Guest





PostPosted: Wed Sep 24, 2008 12:13 am    Post subject: Reply with quote

Nevermind... Installed the C+ Redist & rebooted. All's well...
Back to top
Nailor



Joined: 11 Nov 2008
Posts: 9

PostPosted: Wed Nov 12, 2008 2:46 am    Post subject: How to integrate the raw data line Reply with quote

Hi all,

And many thanks for such an interesting script and topic. Ive noticed a few posts on how to integrate what the RemoteControldll returns into an ahk script for eaxample.

Device:4-Size:3 -> RawData: ->02<-->00<-->00<-
Device:4-Size:3 -> RawData: ->02<-->24<-->02<-

how is this interpreted in ones own ahk script. Im a complete newbie and apols but if i know this icould play around a bit and learn a bit more.

i dont follow most of the code but know basic ahk functions. i imagine most of Michas code is unnecessary for what i want to do, for example use extra buttons on a gyro mouse for paging backwards of forwards in IE etc.

Again apols if its simple but we all gotta start somewhere.
Back to top
View user's profile Send private message
Kornelis
Guest





PostPosted: Wed Nov 19, 2008 1:29 pm    Post subject: Reply with quote

Hi,

i have a Dell 7-Button Mouse at work (produced by Logitech i guess).
The two additional Buttons are the Tilt Wheel Buttons (flip scrollwheel to the left or right). Unfortunetly the dll doesn't realize that the tilt function has been used Sad



It would be great to get this working, as i'd like to use the tilt wheel function to switch thru the Tabs in firefox, for example.

at home i use a 10 Button Logitech MX 1000 Bluetooth mouse, which also has this tilt wheel function. I haven't tried the dll until now with MX1000 but i hope it works there. If not, it would be nice if some could give me some advises how to get it work, since the Logitech software does not work if i connect the mouse via the internal bluetooth interface and not via their USB Dongle.

Thanks and best Regards

Kornelis
Back to top
Cholito



Joined: 25 Sep 2006
Posts: 6
Location: Peru

PostPosted: Sun Nov 23, 2008 7:08 pm    Post subject: Help with two wheel mouse Reply with quote

I use the A4Tech mouse model WOP-35 (http://www.a4tech.com/ennew/download%20driver.asp?cmodnum=WOP-35); it has 5 buttons (4 are programmables) and 2 wheels for horizontal and vertical scrolling; the foremost wheel is at the same time the third (middle) button, the rear wheel is only wheel.
AHK has no problem with the five buttons. But neither Windows XP Professional or Vista (32 and 64 bit), nor AHK detect independently the rear wheel. Both wheels scroll vertically, and if I assign horizontal scroll to a wheel with AHK, the other makes the same. Now I'm using Windows XP SP2 (32 bit) and Vista (64 bit) on different computers.
The mouse A4Tech wheel technology is different from that of Microsoft (Logitech and clones). Microsoft mouse has only one wheel that tilts for horizontal scrolling. Windows Vista support is for Microsoft's mouse, not for others.
Micha's AutoHotkeyRemoteControlDLL.ahk script recognizes my mouse but I have not been able to make a functional script that appropriately puts into operation the two wheels. I'm not a programmer Crying or Very sad . In panel "Device Description" appears:
1 KEYBOARD
2 KEYBOARD
3 MOUSE
4 MOUSE

Clicking on "3 MOUSE", panel "Device Info" shows:
DeviceID: 2
Buttoncount:2
Samplerate:60
Name:\??\Root#RDP_MOU#0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd}
USAGE: 2 USAGEPAGE: 1

And clicking on "4 MOUSE", panel "Device Info" shows:
DeviceID: 32
Buttoncount:5
Samplerate:100
Name:\??\Root#*PNP0F03#1_0_21_0_31_0#{378de44c-56ef-11d1-bc8c-00a0c91405dd}
USAGE: 2 USAGEPAGE: 1

Clicking "Register" button, the next information is the same to both of them ("3 MOUSE" y "4 MOUSE"):
"Respond from device" (scrolling foremost or rear wheel, up or down): the result is 4 most of times, but sometimes appears 0 (when appears 0, all next elements are 0 too).

FOREMOST WHEEL (when result from "Respond from device" is 4):
UPWARD:
Flags: 0
BtnFlag: 1024
ButtonData: 120
RawButton: 0
X: 0
y: 0
Extrainfo: 0

DOWNWARD:
Flags: 0
BtnFlag: 1024
ButtonData: 65416
RawButton: 0
X: 0
y: 0
Extrainfo: 0

REAR WHEEL (when result from "Respond from device" is 4):
UPWARD:
Flags: 0
BtnFlag: 1024
ButtonData: 240
RawButton: 0
X: 0
y: 0
Extrainfo: 0

DOWNWARD:
Flags: 0
BtnFlag: 1024
ButtonData: 65296
RawButton: 0
X: 0
y: 0
Extrainfo: 0

I wish to assign horizontal scrolling for foremost wheel (middle button), and vertical scrolling for rear wheel. AHK (via menu item "View -> Key history and script info") recognizes the wheels, but the script, using the detected "virtual key" and "scan code", doesn't function, neither Windows XP nor Windows Vista; notwithstanding Vista offers support for horizontal scrolling. The following are the values detected by AHK:
FOREMOST WHEEL:
Upward: vk: 9F, sc: 001
Downward: vk: 9E, sc: 001
REAR WHEEL:
Upward: vk: 9F, sc: 002
Downward: vk: 9E, sc: 002

The following one is my nonfunctional script:
Code:
;HORIZONTAL SCROLLING FOR FOREMOST WHEEL:
vk9Fsc001:: ;SCROLL LEFT.
ControlGetFocus, control, A
SendMessage, 0x114, 0, 0, %control%, A ;0x114 is WM_HSCROLL (Windows Message Horizontal Scroll) and the 0 after it is SB_LINELEFT (Scroll Bar Line Left).
return

vk9Esc001:: ;SCROLL RIGHT.
ControlGetFocus, control, A
SendMessage, 0x114, 1, 0, %control%, A ;0x114 is WM_HSCROLL and the 1 after it is SB_LINERIGHT.
return

;VERTICAL SCROLLING FOR REAR WHEEL:
vk9Fsc002:: ;SCROLL UP.
ControlGetFocus, control, A
SendMessage, 0x115, 0, 0, %control%, A ;0x115 is WM_VSCROLL and the 0 after it is SB_LINEUP.
return

vk9Esc002:: ;SCROLL DOWN.
ControlGetFocus, control, A
SendMessage, 0x115, 1, 0, %control%, A ;0x115 is WM_VSCROLL and the 1 after it is SB_LINEDOWN.
return
AHK can't discriminate both wheels independently.
It is desirable that AHK (via the menu item "View -> Key history and script info") includes automatically Micha's dll, avoiding troublesome scripts that we, the common and anguished users, cannot do.
I wish to do a script using the excellent works of Micha and Chris, that eliminate heavy drivers. Could you please help me?
Thank you very much in advance.
Sorry my English.
_________________
¿Cuándo traducimos AHK al español?


Last edited by Cholito on Thu Jan 01, 2009 8:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
elmulti



Joined: 14 Jan 2008
Posts: 34
Location: Germany

PostPosted: Sat Dec 06, 2008 4:44 pm    Post subject: Can't detect Sleep-Button on remote Reply with quote

Thanks Micha for the DLL and the scripts!

I get the impression that you wrote it for the exact remote control that I have now (old Cyberlink model, black). Your sample script works very nicely with my remote without changing the devices.

I'm wondering if there is a way to access the sleep-button (looks like a power-button) as well.
Windows Vista allows me to disable it, to trigger a shutdown with it or to send the computer into sleep mode with this key.
Unfortunately your script doesn't detect the sleep/power-button. The simple AHK-command "Sleep::" also doesn't work.

In addition, I can't change the buttons for Enter, Numbers, Clear and OK, but that's less important to me right now.


Edit: Media Center still tries to launch a DVD if I hit the DVD-Button, in addition to what AHK does upon pressing the button. Is there a way to totally overwrite the old function of this button?
Back to top
View user's profile Send private message
Rock
Guest





PostPosted: Sat Dec 13, 2008 7:04 pm    Post subject: Above my head Reply with quote

I am new at this, please bear with me,

I am using a second mouse and a second keyboard. Both are to be used to send hotkeys. Here's what I can gather using AutoHotkeyRemoteControlDLL:

_________________________________________________________
My regular keyboard is registering as a keyboard with Device ID 7.
My hotkey keyboard is registering as a keyboard with Device ID 3.

When the space key is pressed on either keyboard I receive:

Code:
MakeCode: 57
Flags: 1
Key: 32
Msg: 257
Extrainfo: 0

_________________________________________________________
My regular mouse is registering as a mouse with Device ID 11.
My hotkey mouse is registering as a mouse with Device ID 10.

When the left mouse button is pressed on either mouse I receive:

Code:
Flags: 0
BtnFlag: 1
ButtonData: 0
RawButton: 0
X: 0
Y: 0
Extrainfo: 0


What I would like to do is create a script that will allow me to make a hotkey for each key and button. I don't mind entering them in one key at a time if I had a model (That is why I posted the "space key[/code]
Back to top
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, 8, 9, 10  Next
Page 7 of 10

 
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