Jump to content

Recommended Posts

Posted (edited)

A simple search and you would have found >> by Yashied :)

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Moderators
Posted

darkmaster071,

One way would be to link both keys to the same HotKey function and then check if both are pressed - like this:

#include <Misc.au3>

; Set HotKeys to same function
HotKeySet("q", "_Q1")
HotKeySet("1", "_Q1")

While 1
    Sleep(10)
WEnd

Func _Q1()

    ; Unset HotKeys to prevent possible double hit
    HotKeySet("q")
    HotKeySet("1")

    ; Are both keys pressed?
    $iBegin = TimerInit()
    Do
    If _IsPressed("31") And _IsPressed("51") Then
        MsgBox(0, "Success", "Double HotKey!")
    EndIf
    Until TimerDiff($iBegin) > 100 ; Play with the delay - this seems to work pretty well

    ; Reset HotKeys
    HotKeySet("q", "_Q1")
    HotKeySet("1", "_Q1")

EndFunc

I hope that is suitable. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

Didn't think of that little workaround :) Will bare that in mind for the future. Thanks.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Moderators
Posted

guinness,

I must admit I was quite pleased with it myself - even worked straight out of the box! :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

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...