Griffin Powermate (USB) AHKHID script

Post your working scripts, libraries and tools
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
Posts: 1204
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.

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:
(28.95 KiB) Downloaded 20 times
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")
GuiHandle := WinExist()
AHKHID_Register(12, 1,GuiHandle)
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)




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.
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.
Posts: 1
Joined: 07 Sep 2016, 07:51

Re: Griffin Powermate (USB) AHKHID script

25 Aug 2018, 01:49

Thank you very much for the script.
I'm new on AutoHotKey and i have some probleme.

This work fine for me:

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

If (key == 16711680) ; turn Powermate left
SendInput {WheelDown} ;send mousewheel down

If (key == 65536) ; turn Powermate right
SendInput {WheelUp} ;send mousewheel up

let's go to my problems
1. those don't work (Im Testing, is why i sending text)

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

	If (key == 256) ; press button
SendInput text ;assign your own action

If (key == 16711936) ; press button + turn Powermate left
SendInput Hello ;assign your own action

If (key == 65792) ; press button + turn Powermate right
SendInput bonjour ;assign your own action

2. is this normal that "Long Press Button" is Missing ?

3. How i create a focus for: Windows, Vivaldi, Musicbee Or Notepad++ etc...
(I read these two links but I don't understand

4. How i mix "Control" & turn Powermate left by example.

Windows 10 Pro 64bits
PowerMate USB MASM-03169

Thanks in advance for your help


PS. Sorry for my bad english

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Relayer, robodesign and 14 guests