 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Peter
Joined: 30 Dec 2005 Posts: 279
|
Posted: Mon Aug 11, 2008 5:45 pm Post subject: "Lbutton up" in Gui gLabel calls first hotkey |
|
|
I asked in Help forum already, but came only to the conclusion it must be a bug.
If a hotkey "Lbutton up" is placed in a label routine of Gui, then another hotkey routine (instead of Lbutton up) is called first.
Namely the first defined hotkey routine in the script, in this case FirstHotkey. | Code: | ; (Tested with 1.0.47.00 and 1.0.47.06 on WindowsXP)
Gui, add, text, gtxtLbutton, Click on this text (Ahk V%A_AhkVersion%).
Gui, show, x300 y500 w250, Lbutton up in gLabel
; Hotkey, LButton up, LButtonUp ; this doesn't cause other hotkey call
Hotkey, F9, FirstHotkey
Hotkey, F10, AnotherHotkey
; F9:: ; same effect as "Hotkey, F9, FirstHotkey"
; Msgbox,,,%A_thisHotkey% pressed!,
; return
return
FirstHotkey:
AnotherHotkey:
Msgbox,,,%A_thisLabel% called!,
return
txtLbutton:
Hotkey, LButton up, LButtonUp ; another hotkey then "LButton up" is no problem
; But if "LButton up", it causes to call FirstHotkey routine first
return
LButtonUp:
Hotkey, LButton up, off
Msgbox %A_thisLabel% (LButton up off)
return
GuiClose:
ExitApp |
|
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1276
|
Posted: Mon Aug 11, 2008 5:55 pm Post subject: |
|
|
It does the same for me, running 2k sp4, ahk 1.0.47.06. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Tue Aug 12, 2008 4:23 pm Post subject: |
|
|
same happens here, and I see a different problem.
| Code: |
settimer sethotkeys, -5000
; (Tested with 1.0.47.00 and 1.0.47.06 on WindowsXP)
Gui, add, text, gtxtLbutton, Click on this text (Ahk V%A_AhkVersion%).
Gui, show, x300 y500 w250, Lbutton up in gLabel
; Hotkey, LButton up, LButtonUp ; this doesn't cause other hotkey call
; F9:: ; same effect as "Hotkey, F9, FirstHotkey"
; Msgbox,,,%A_thisHotkey% pressed!,
; return
return
txtLbutton:
tooltip %A_thisLabel% called!
Hotkey, $LButton up, LButtonUp ; another hotkey then "LButton up" is no problem
; But if "LButton up", it causes to call FirstHotkey routine first
return
FirstHotkey:
AnotherHotkey:
tooltip %A_thisLabel% called!
return
LButtonUp:
tooltip %A_thisLabel% (LButton up off)
Hotkey, $LButton up, off
return
GuiClose:
ExitApp
sethotkeys:
Hotkey, F9, FirstHotkey
Hotkey, F10, AnotherHotkey
return
|
I was playing around with this to find a workaround, but when I test, I can't get LButtonUp called a second time. Something is definitely odd. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|