Issue with OnEvent, KEY_DOWN

A Snippet from: hagchr

//Initialize parameters (VK49=1, VK50=2, VK51=3)
CodeBlock
    Let>k1=VK49
    Let>k2=VK50
    Let>k3=VK51
EndCodeBlock

//Events
CodeBlock
    OnEvent>KEY_DOWN,k1,0,key_1
    OnEvent>KEY_DOWN,k2,0,key,k2
    OnEvent>KEY_DOWN,k3,0,key,k3
EndCodeBlock

Label>Main
    Wait>0.2
Goto>Main

SRT>key_1
    MessageModal>%k1% was pressed
END>key_1

SRT>key
    If>key_var_1=%k2%
        MessageModal>%k2% was pressed
    Endif
    If>key_var_1=%k3%
        MessageModal>%k3% was pressed
    Endif
//END>key
END>keyx

Select the code above to paste into your macro. Or: View Raw Text

Link: http://www.mjtnet.com/snip.htm?g=5342664133dfd

Forum Embed Code - click to select all then copy (CTRL-C):

When pasting into the forum do NOT modify the script code or it will not match what is in the database - create a new snippet instead!