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 

A double click hotkey
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
scriptmonkey



Joined: 19 May 2006
Posts: 112

PostPosted: Thu Mar 01, 2007 5:08 pm    Post subject: Reply with quote

Anyone know how I can have a hotkey in "Real Expose" clone where the Middle Mouse button is double clicked ?

http://www.autohotkey.com/forum/viewtopic.php?t=13001

Code:


Read_Keymapping:
  Hotkey, #TAB    ,  Window_Choose
  Hotkey, MButton ,  Window_Choose
  Hotkey, IfWinActive , »Expose«
  Hotkey, #TAB    ,  Window_Activate
  Hotkey, IfWinActive , »Expose«
  Hotkey, MButton ,  Window_Activate
  Hotkey, IfWinActive , »Expose«
  Hotkey, LButton ,  Window_Activate
  Hotkey, IfWinActive , »Expose«
  Hotkey, Esc     ,  hide_gui
  Hotkey, +MButton , handle_exit ; panik-key
Return

_________________
Zak M.
Back to top
View user's profile Send private message
guest_programmer
Guest





PostPosted: Sun Mar 04, 2007 5:04 am    Post subject: THANK YOU! Reply with quote

Here's what I ended with... work like a charm btw!

Code:
; Double-click F12 to run the program
F12::
KeyWait, F12
KeyWait, F12, D, T0.12
If ErrorLevel = 1
   Return
Else

[run the rest of the code encountered]
Back to top
Rhys



Joined: 17 Apr 2007
Posts: 736
Location: Florida

PostPosted: Thu Apr 26, 2007 2:01 pm    Post subject: Reply with quote

Why not integrate your script with the KeyWait example? Seems like it would work as long as you do a conversion for the 'T' variable. It seems like KeyWait should work for mouse input too... You could do a nested IF to see if the double click is in the 'double click zone' you specify.

I'm pretty new to all this so I may just be spouting nonsense, hope it helps.
_________________
[Join IRC!]

http://www.codeforcure.org/
Back to top
View user's profile Send private message
Terka



Joined: 21 Aug 2007
Posts: 9

PostPosted: Tue Jun 03, 2008 12:16 pm    Post subject: Reply with quote

how to use shift-f5 combination instead of f12 ??
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6856
Location: Pacific Northwest, US

PostPosted: Tue Jun 03, 2008 5:59 pm    Post subject: Reply with quote

Code:

; Hold Shift and Double-click F5 to run the program
+F5::
KeyWait, F5
KeyWait, F5, D, T0.12
If ErrorLevel = 1
   Return
Else

[run the rest of the code encountered]

_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Terka



Joined: 21 Aug 2007
Posts: 9

PostPosted: Wed Jun 04, 2008 9:10 am    Post subject: Reply with quote

thank you for reply. Copied it to my script.
Tried following in total commander, but in TC the following script is not working Sad
Code:

+F5::
KeyWait, F5
KeyWait, F5, D, T0.22
If ErrorLevel = 1
        {
         Send +{F5}
        }

Else
        {
         Send +{F5}
         WinWaitActive,ahk_class TCheckEditBox
         Send {END}__%A_YYYY%-%A_MM%-%A_DD%_%A_Hour%-%A_Min%.bak{ENTER}
        }

but
Code:
+F5::
KeyWait, F5
KeyWait, F5, D, T0.22
If ErrorLevel = 1
        {
         cmd := "cm_CopySamepanel"
         SetKeyDelay, 0
         send %cmd%{enter}
        }

Else
        {
         cmd := "cm_CopySamepanel"
         SetKeyDelay, 0
         send %cmd%{enter}
         WinWaitActive,ahk_class TCheckEditBox
         Send {END}__%A_YYYY%-%A_MM%-%A_DD%_%A_Hour%-%A_Min%.bak{ENTER}
        }

is working fine. So it looks like in the code

Code:

Send +{F5}

is a bug. What am i doing wrong?
Back to top
View user's profile Send private message
HugoV



Joined: 27 May 2007
Posts: 617

PostPosted: Wed Jun 04, 2008 10:40 am    Post subject: Reply with quote

Try this:
Code:
~+F5::
;...rest of your code
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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