AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Shortcut Pressing Esc twice to do something? in multipl GUIs

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Deep-Silence



Joined: 24 Apr 2009
Posts: 87

PostPosted: Sat Jan 02, 2010 6:26 pm    Post subject: Shortcut Pressing Esc twice to do something? in multipl GUIs Reply with quote

Hi Guys,

I want to create a shortcut
Pressing {ESC} twice.

I want to close every GUI of my Program with this shortcut,
Code:

EscEsc::


brings up the message that the Key is not specified.
any ideas how to solve this?

Thanks,
Deep-Silence
Back to top
View user's profile Send private message
None



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Sat Jan 02, 2010 6:39 pm    Post subject: Reply with quote

Code:
DCT:=300  ;Double Click Time
$Esc::
Last:=This ;Save previous time
This:=A_TickCount ;Save This Time
If((This-Last)>DCT)  ;Test if double click was less than DCT
{
    SetTimer Esct, -%DCT% ;if yes set single run timer for EscT
}
Else
{
    SetTimer EscT, Off    ;if not kill timer
    ;Code to Close GUI's
}
Return

EscT:
    Send {Esc}
    KeyWait, Esc
    Send {Esc Up}
Return

Making a double press hotkey is not that easy, but not Too diffucult
Back to top
View user's profile Send private message
Deep-Silence



Joined: 24 Apr 2009
Posts: 87

PostPosted: Sat Jan 02, 2010 10:43 pm    Post subject: Reply with quote

Hi None,

For an advanced Beginner,
it is little difficult, because i do not knew where to start.

Thank You.
Deep-Silence
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group