 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu Oct 01, 2009 6:22 am Post subject: disable a hotkey when in text mode |
|
|
| How can I disable my hotkey when in text mode? I mean, if I set "A" to do something, I don't want it to work when I'm writting a text, because otherwise I cannot write any word with the "A" letter. Maybe there's a way I can tell my script to disable the hotkey when the mouse pointer is not in the pointer format...? |
|
| Back to top |
|
 |
Klaus
Joined: 12 May 2005 Posts: 325 Location: Münster, Germany
|
Posted: Thu Oct 01, 2009 7:17 am Post subject: |
|
|
Hi, Guest (a nice nick would be nice!),
try something like this and play around with it | Code: | SetTitleMatchMode, 2
Settimer, detectFocus, 3000 ; or a shorter cycle
Gui, Add, Edit, w100 h20
Gui, Add, Button, w100 h20, test-button
Gui, Show, w300 h100, Focus
return
detectFocus:
Gui, Submit, Nohide
ControlGetFocus, OutputVar , Focus ,,
ifInString, OutPutVar, Edit ; or other controls, as you like it!
{
MsgBox, It's an edit control`nso disable my "a"-hotkey
}
return |
Hope I could help,
Klaus |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Oct 01, 2009 9:49 am Post subject: |
|
|
Sorry that doesn't work.
My hot key does:
ç::
^w
winclose, a
but if I open the notepd, I cannot write the ç key without activating the hotkey. |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 1002 Location: Germany - Deutschland
|
Posted: Thu Oct 01, 2009 9:52 am Post subject: |
|
|
Then try the command
#IfWinNotactive,
Look for it in the help-file. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Oct 01, 2009 12:45 pm Post subject: |
|
|
| But... if notepad is active, the hotkey should close it, but not if the mouse pointer is in the text area. Same with explorer. If I click on the url field, the hotkey should not close the programa. Got it? |
|
| 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
|