Jump to content

Recommended Posts

Posted

i got interested in a topic it says:

HotKeySet("b","b_pressed")

Func b_pressed()

Send("b")

EndFunc

and it doesnt sends anything, so is that a bug or if not then how after u press b it sends b

Posted (edited)

Or you could do something more elegant, like this:

HotKeySet("b", "_SendHotKey")

While 1
    Sleep(250)
WEnd

Func _SendHotKey()
    Local $svKey = @HotKeyPressed
    HotKeySet($svKey)
    
    TrayTip("", $svKey & " was pressed", 5)
    
    Send($svKey)
    HotKeySet($svKey, "_SendHotKey")
EndFunc

That way, you only need one function for all of your keys(if you intend to use it with several that is). :D

Edited by FreeFry
Posted

Or you could do something more elegant, like this:

HotKeySet("b", "_SendHotKey")

While 1
    Sleep(250)
WEnd

Func _SendHotKey()
    Local $svKey = @HotKeyPressed
    HotKeySet($svKey)
    
    TrayTip("", $svKey & " was pressed", 5)
    
    Send($svKey)
    HotKeySet($svKey, "_SendHotKey")
EndFunc

That way, you only need one function for all of your keys(if you intend to use it with several that is). :D

thanks

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...