Need help comparing a variable to a hex value Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
jnkettenring
Posts: 2
Joined: 16 Jul 2018, 13:04

Need help comparing a variable to a hex value

20 Jul 2018, 13:50

Hello,

I'm trying to map some unique buttons on a Natural Ergonomic Keyboard 4000 v1.0. I've gotten the all the buttons I want mapped, working, except the "("
and ")" buttons. Their ID numbers are "010000B600010000" and "010000B700010000" respectively. I am assuming the issue is because these ID number have letters in them as well, and the way i have it is trying to compare them as decimal numbers.
Can someone please tell me how I should be comparing these values?

Snippet of my code is below:

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus

trust_me
Posts: 47
Joined: 29 Jul 2017, 10:46

Re: Need help comparing a variable to a hex value  Topic is solved

21 Jul 2018, 02:10

You can compare all your values as strings ( numbers or mixed with letters)

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

data = 010000B600010000

if (data="010000B600010000")
msgbox found
else
msgbox not found
jnkettenring
Posts: 2
Joined: 16 Jul 2018, 13:04

Re: Need help comparing a variable to a hex value

23 Jul 2018, 10:07

Thank you! This worked perfectly for what I needed.

Return to “Ask For Help”

Who is online

Users browsing this forum: Hellbent, ZeroX4 and 70 guests