Jump to content
Sign in to follow this  

Keypad "000" as a hotkey in V3

Recommended Posts



Sorry guys, wrong forum, I meant to put this in V3 NOT V2, my apologies!



Hi folks,

I'm partly a noob, but I'm learning fast. I have written a script to bind my entire external keypad to hotkeys. Problem is, the keypad has a special "000" key. The problem I'm encountering is the Keypad000 is really just a built-in circuit that pulses the "0" key three times. I've tried using a counter and a timer to capure three 0's within a specified time frame to detect a numpad000 'else' pass on just a single numpad0 but I'm still having trouble with it. It's proven to be a challenge. Has anyone out there got a better solution? I'm embarassed to say I've spent a day and a half on this with mixed results. I've seen someone's solution here but with a beta or something, the code is not compatible with V3. I'm also having a hard time translating it into V3 code. Any help would be met with cheers and mug of the finest ale if we ever meet. I live in Toronto, Ontario, Canada BTW.

Here is what I have so far, I just put focus in a TXT file while running it to capture the results. I think I need to find better solution for the timestamping...

HotKeySet("{numpad0}", "num0")

while 1

func num0()
    if $num0=3 then
        send("n000 is pressed{enter}");XXXXX NUMPAD 000 FUNCTION HERE XXXXX
    elseif $num0<3 then
        send("n0 is pressed{enter}");XXXXX NUMPAD 0 FUNCTION HERE XXXXX
Edited by Kulanb

Share this post

Link to post
Share on other sites

If the following doesn't work, try increasing the tolerance. One note: You have to fully press down and press up the 000 key for the event to fire. That is, if you hold down on 000, it will not repeat.....

HotKeySet("{NumPad0}", "trap000button")

Global $tolerance = 100;milliseconds
Global $numpad0Count = 0
Global $timer

While 1

Func trap000button()
    If $numpad0Count = 0 Then $timer = TimerInit()
    $numpad0Count = $numpad0Count + 1
    If $numPad0Count = 3 Then
        $numPad0Count = 0
; Let's send the equals sign when the 000 button is pressed
    If TimerDiff($timer) > $tolerance Then $numpad0Count = 0

Edit: Well, the individual NumPad zero key won't work either with my code. I need to think about this.

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.