Griffin Powermate (USB) AHKHID script

Post your working scripts, libraries and tools
Stevie
Posts: 24
Joined: 15 Nov 2013, 19:32

Griffin Powermate (USB) AHKHID script

19 Jun 2018, 18:03

Here's my script to control the Griffin Powermate. This enables you to get rid of the official (unsupported) Powermate software.
Per default, only left and right turn are assigned (mousewheel up and down), but you can easily add the other functions as well (button press, button press + turn left, button press + turn right.
Additionally you can also use modifiers (which is not possible with the official software). So you can use CTRL + Powermate turn left, etc...
And last but not least, you could also create different assignments, depending on which window has focus.

The only thing you can't configure: the LED.


Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Last edited by Stevie on 19 Jun 2018, 19:19, edited 4 times in total.
User avatar
Xtra
Posts: 1193
Joined: 02 Oct 2015, 12:15

Re: Griffin Powermate AHKHID script

19 Jun 2018, 18:26

Could you please post/link which model of Griffin Powermate you are using (Im going to assume the bluetooth model wouldnt work?) and maybe a source link to the ahkhid.ahk.

Thanks
Stevie
Posts: 24
Joined: 15 Nov 2013, 19:32

Re: Griffin Powermate (USB) AHKHID script

19 Jun 2018, 18:40

Hey Xtra,

I'm indeed using the USB version of the Powermate. Unfortunately, I cannot say, if this will work with the bluetooth version.
However, you can try it first. Maybe it does work. And if not, there are ways to get this working ;)

That's the AHKHID.ahk I'm using:
AHKHID.ahk
(28.95 KiB) Downloaded 15 times
Stevie
Posts: 24
Joined: 15 Nov 2013, 19:32

Re: Griffin Powermate (USB) AHKHID script

29 Jun 2018, 20:59

That's a good question. To find out what codes are sent, I used this script. I'm not really sure, if these are scan codes.
They looked strange to me :P

SetWorkingDir %A_ScriptDir%
#include ahkhid.ahk

Gui,Add,Text,,Click and hold additional mouse button with this window active`nTake notice of numbers in tooltip`nNote them as they change when you press (hold) button or release it
OnMessage(0x00FF, "InputMsg")
Gui,+AlwaysOnTop
Gui,Show
GuiHandle := WinExist()
AHKHID_Register(12, 1,GuiHandle)
return
InputMsg(wParam, lParam) {
Local r, h
Critical ;Or otherwise you could get ERROR_INVALID_HANDLE
If (AHKHID_GetInputInfo(lParam, II_MSE_RAWBUTTONS) != 0)
ToolTip,% AHKHID_GetInputInfo(lParam, II_MSE_RAWBUTTONS)

}

GuiClose:
ExitApp

Rudantu

Re: Griffin Powermate (USB) AHKHID script

11 Aug 2018, 03:58

Hi, this script is so close to perfect for me, however my model of powermate shows up as a mouse (NOT a HID, so different usage page, identifying values such as no. of buttons instead of vendor ID, and will be outputting mouse-position-changes not keys)

Could you help me adjust your script to work with a mouse instead of HID? I've tried analyzing other mouse related scripts and hacking yours to match but alas, I am new to scripting and can't figure it out.
Stevie
Posts: 24
Joined: 15 Nov 2013, 19:32

Re: Griffin Powermate (USB) AHKHID script

11 Aug 2018, 18:02

Hm, is it the USB version or Bluetooth?
Do you have the driver installed? I'm not 100% sure but it could be, that it behaves like a mouse, when the driver is loaded.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: hoppfrosch and 7 guests