1

AutoHotKey automatically closes when pressing Win+E. It only happens when I my running the script as administrator. I do not have a script assigned to close AutoHotKey on pressing Win+E.

When I run the same script on a different computer using the same AutoHotKey version, it works as excepted and does not close AutoHotKey.

How do you fix this issue? Any suggestions will be very helpful.


No, I don't have a script which overrides the Windows defaults.

I have check my script and there seems to be no return statements missing.

The scripts works fine and causes no issues when running on another computer running windows 7 64bit edition. It only closes Autohotkey on the computer I created this script which has windows 7 32bit edition and running in administrator account. I am using Autohotkey Basic 32Bit Version.

DMA57361
  • 18,662
Ishan
  • 3,432
  • 2
    Can you provide the full script? You may have a minor error in your script logic. – iglvzx Jul 20 '12 at 03:07
  • Make sure that you use return to avoid having a hotkey “fall-through” to the next one. – Synetech Jul 20 '12 at 03:12
  • @Synetech Yes. This is the kind of minor logic error I'm thinking about. – iglvzx Jul 20 '12 at 03:16
  • Well I spelled out the obvious/common one so that they can check it because they may not be able to post their (whole) script. – Synetech Jul 20 '12 at 03:25
  • @Jack, FYI you had two separate (unregistered) accounts, which is why you were forced to 'answer' your own question instead of being able to edit/comment. I've merged the two accounts (you should consider registering to avoid this happening again) and injected your answer into the question as an edit so nothing is lost. – DMA57361 Jul 25 '12 at 08:08
  • No, I don't have a script which overrides the Windows defaults.

    I have check my script and there seems to be no return statements missing.

    The scripts works fine and causes no issues when running on another computer running windows 7 64bit edition. It only closes Autohotkey on the computer I created this script which has windows 7 32bit edition and running in administrator account. I am using Autohotkey Basic 32Bit Version.

    – Ishan Jan 19 '13 at 03:16

1 Answers1

0

On Windows, the default action of Win+E is to open (My) Computer in a Windows Explorer window, which may have something to do with this issue—though exactly what that has to do with the problem is not obvious to me. Since you’re using AutoHotkey, you should be able add something to your .ahk script like the following to make that keyboard combination do nothing:

#e::return  ; ignore winkey+e
martineau
  • 4,487
  • > On Windows the default action of Win+E is to Open (My) Computer   AutoHotkey thankfully overrides the Windows defaults, which makes it possible to open the command-prompt with Win+P since that is one of the Win-keys that don’t get disabled with NoWinKeys. – Synetech Jul 20 '12 at 02:15
  • @Synetech: It's unclear to me what point you're trying to make... – martineau Jul 20 '12 at 02:53
  • 1
    My points is that AutoHotkey overrides the Windows default combos, so pressing Win+E should not be opening Explorer if the script is set to use it. And if the script does not use it, then it should just open Explorer and should not have an effect on the script. – Synetech Jul 20 '12 at 03:09
  • @Synetech: Sorry, I believe you are mistaken. While AutoHotKey certainly can override the default Win + key combinations, it doesn't do so by default. Win+E operated as I described (i.e. normally) for me even though I have a full-time ahk script running at all times which was loaded at startup. – martineau Jul 20 '12 at 12:40
  • Does your full-time ahk script include a Win+E hotkey? – Synetech Jul 20 '12 at 13:32
  • @Synetech: No, it does not. It does has a number of other Win+ key combinations, though. – martineau Jul 20 '12 at 15:11
  • Then what bearing does it have on the issue? It sounds like everything is working as expected in your case; Win+E opens an Explorer window and your script runs. The OP probably has a problem with their script (I still have not memorized the characters for the modifier keys); it is unlikely to be a Windows interaction. – Synetech Jul 20 '12 at 15:39
  • @Synetech: No, I don't have the OP's problem. My answer shows how to disable the key combination altogether -- i.e. to explicitly make it start intercepting the Win+E combination (which it doesn't do automatically) and tell it to ignore it -- in the hope that it will fix the problem for them. – martineau Jul 20 '12 at 15:58
  • Yes, except that even if it works, it is only treating the symptom, not fixing the underlying problem. – Synetech Jul 20 '12 at 16:07
  • @Synetech: Unlike you, I don't think it's their .ahk script if the only difference is whether they're running it as administrator or not -- so I'm just being pragmatic. – martineau Jul 20 '12 at 16:52