Sorry for my inactivity. Busy times...
I haven't read all the new posts, but to address a few of the issues discussed.
specter333 wrote:
One question I have now, can the AHKHID.ahk be referenced as a library instead of using #include? I know in the script it says it must be included to use constants, which I'm not sure what the constants are.
Yes. AHKHID can be used both ways:
- If you use #Include in the auto-execute section of your script, then you will have access to the constants automatically. There's no need to call AHKHID_UseConstants().
- If you don't use #Include (or if you used #Include but not in the auto-execute section), but have AHKHID in one of your
library folders, then you can call AHKHID_UseConstants() if you want to use the constants.
Hope this made sense.
curious1 wrote:
I have entered
;Register mouse with RIDEV_INPUTSINK (so that data is received even in the background)
r := AHKHID_Register(12, 1, hGui, RIDEV_INPUTSINK)
If Not r { ;Check for error
MsgBox, Registration failed!`n%ErrorLevel%
ExitApp
}
AHKHID_Register() returns 0 on success, and -1 on error. Let me know if you got this from one of my scripts, because it's wrong!
curious1 wrote:
Question: How do I assign specific macro to the specific mouse (based on the info here and assuming it will register)
It is definitely possible to differentiate between two mice/keyboards. See
Multiple mice cursors for an example.
Blahman wrote:
Is there any way to filter out that data or does anyone have any other ideas of what I can do?
This falls under the category of
the bolded question in the first post. The bottom line is that AHKHID cannot stop a device from sending whatever message it wants to send.
specter333 wrote:
I really don't understand the verify code your using
Ideally, you should check what value AHKHID_Register() returns to see if the registration was successful. If it wasn't successful (returns -1), you can inform the user/take appropriate action.
specter333 wrote:
So if you, or anyone, could offer some suggestions on what I should read (or pictures to look at) I would appreciate it.
I'm happy to know that you want to learn! Maybe you could go through the tutorial (second post in this thread), step-by-step, and make sure you understand what's going on in each step. Even if you don't have a remote to play along with, it might be useful just to learn about AHKHID (or just AHK) in general. And if you have specific questions, you can ask! (if it's about AHK in general, it might be better to ask in the Ask For Help section).
Once the tutorial makes sense, start to look at the example scripts as well!