Jump to content
Sign in to follow this  
tengwer

_hotkeyset udf

Recommended Posts

tengwer

I remember seeing a UDF called _HotkeySet which was pretty cool. I've looked all over and can see where it's been used in the forum but can't find where to download it. Could someone direct me? Is there one place I can go to find all the current UDFs and help file for them? Thanks for your help! ;)

Share this post


Link to post
Share on other sites
KaFu
tengwer

No. If you do a search for _hotkeyset you'll see where this is used but I can't find where you can download it. ;)

Share this post


Link to post
Share on other sites
KaFu

Yeah, I see, but don't know which UDF that posts refer to... but for sure it can't do anything you can do with above mentioned UDF by Yashied!

Share this post


Link to post
Share on other sites
AdmiralAlkex

No. If you do a search for _hotkeyset you'll see where this is used but I can't find where you can download it. ;)

Exactly which _hotkeyset are you talking about? Link please.

Share this post


Link to post
Share on other sites
tengwer

#include <Misc.au3>
Global $Key1 = "2C"
Global $Key2 = "11"
Global $Key3 = ""

$dll = DllOpen("user32.dll")

While 1
    If $Key1 <> "" AND $Key2 = "" AND $Key3 = "" Then 
        If _IsPressed($Key1, $dll) Then 
            $ButtonState = "Pressed"
            Pressed()
        EndIf
    EndIf
    If $Key1 <> "" AND $Key2 <> "" AND $Key3 = "" Then
        If _IsPressed($Key1, $dll) AND _IsPressed($Key2, $dll) Then 
            $ButtonState = "Pressed"
            Pressed()
        EndIf
    EndIf   
    If $Key1 <> "" AND $Key2 <> "" AND $Key3 <> "" Then
        If _IsPressed($Key1, $dll) AND _IsPressed($Key2, $dll) AND _IsPressed($Key3, $dll) Then 
            $ButtonState = "Pressed"
            Pressed()
        EndIf
    EndIf   
WEnd

Func Pressed()
    ;MsgBox(0,"","")
    Sleep(600)
    If $Key1 <> "" AND $Key2 = "" AND $Key3 = "" Then 
        If _IsPressed($Key1, $dll) Then 
            $ButtonState = "Held"
        EndIf
    EndIf
    If $Key1 <> "" AND $Key2 <> "" AND $Key3 = "" Then
        If _IsPressed($Key1, $dll) AND _IsPressed($Key2, $dll) Then 
            $ButtonState = "Held"
        EndIf
    EndIf   
    If $Key1 <> "" AND $Key2 <> "" AND $Key3 <> "" Then
        If _IsPressed($Key1, $dll) AND _IsPressed($Key2, $dll) AND _IsPressed($Key3, $dll) Then 
            $ButtonState = "Held"
        EndIf
    EndIf   
If $ButtonState = "Pressed" Then MsgBox(0,"_IsPressed", "Pressed")
If $ButtonState = "Held" Then MsgBox(0,"_IsPressed", "Held")
EndFunc


DllClose($dll)
The UDF you mentioned may be the one I saw a while ago so thanks for the tip but since then I have created something that meets my needs even better. It is a script that can call a function based on wether a key or combination of keys is either pressed or pressed and held. The script is as follows. Let me know what you think. ;)

Share this post


Link to post
Share on other sites
tengwer

#include <Misc.au3>
Global $Key1 = "2C"
Global $Key2 = "11"
Global $Key3 = ""

$dll = DllOpen("user32.dll")

While 1
    If $Key1 <> "" AND $Key2 = "" AND $Key3 = "" Then 
        If _IsPressed($Key1, $dll) Then 
            $ButtonState = "Pressed"
            Pressed()
        EndIf
    EndIf
    If $Key1 <> "" AND $Key2 <> "" AND $Key3 = "" Then
        If _IsPressed($Key1, $dll) AND _IsPressed($Key2, $dll) Then 
            $ButtonState = "Pressed"
            Pressed()
        EndIf
    EndIf   
    If $Key1 <> "" AND $Key2 <> "" AND $Key3 <> "" Then
        If _IsPressed($Key1, $dll) AND _IsPressed($Key2, $dll) AND _IsPressed($Key3, $dll) Then 
            $ButtonState = "Pressed"
            Pressed()
        EndIf
    EndIf   
WEnd

Func Pressed()
    ;MsgBox(0,"","")
    Sleep(600)
    If $Key1 <> "" AND $Key2 = "" AND $Key3 = "" Then 
        If _IsPressed($Key1, $dll) Then 
            $ButtonState = "Held"
        EndIf
    EndIf
    If $Key1 <> "" AND $Key2 <> "" AND $Key3 = "" Then
        If _IsPressed($Key1, $dll) AND _IsPressed($Key2, $dll) Then 
            $ButtonState = "Held"
        EndIf
    EndIf   
    If $Key1 <> "" AND $Key2 <> "" AND $Key3 <> "" Then
        If _IsPressed($Key1, $dll) AND _IsPressed($Key2, $dll) AND _IsPressed($Key3, $dll) Then 
            $ButtonState = "Held"
        EndIf
    EndIf   
If $ButtonState = "Pressed" Then MsgBox(0,"_IsPressed", "Pressed")
If $ButtonState = "Held" Then MsgBox(0,"_IsPressed", "Held")
EndFunc


DllClose($dll)
The UDF you mentioned may be the one I saw a while ago so thanks for the tip but since then I have created something that meets my needs even better. It is a script that can call a function based on wether a key or combination of keys is either pressed or pressed and held. The script is as follows. Let me know what you think. ;)

The two keys I set in the variables above are the ctrl and printscreen key. From 1 to 3 keys can be used as you can see.

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.