I wrote a script with AutoHotkey to minimize a current using windows task. Namely a sequence of key of Alt, Space, n activated by the press of the right Win key.

RWin::Send !{Space}n

It work perfectly with every software including Firefox but failed in Google Chrome. It just open the File menu and does nothing.

I also tried the following but it made things worse, all the software don't response correctly.

RWin::Send !{Space}
      Sleep, 100
      Send n
  • Does the key combination work when done manually? It works for me in Chrome under Windows 7, XP may be different for whatever reason. – Bob May 22 '12 at 8:53
  • Yes, it works when done manually. But I don't know why. – lamwaiman1988 May 22 '12 at 8:56

You could use the WinMinimize, A command to minimise the active window:

RWin::WinMinimize, A

It's probably better than a sequence of keypresses that activate a context menu option. It apparently sends the same minimise message as the option on that context menu, or the minimise button (top right corner): SC_MINIMIZE.

Tested to work on Chrome 19.0.1084.46 m, Windows 7 x64, AHK


Make it:

RWin::Send {Alt}{Space}n

Tested and working with latest chrome on Windows 7 x64

  • Thing is, I tested his !{Space}n, which also works for me on Win7x64. Unless someone else can confirm this for XP, that slight difference in command probably won't help (who knows, this might actually work - it might be an odd bug). – Bob May 22 '12 at 10:17
  • Bob, I too tested !{Space}n. It works for all programs except chrome(I don't know why..) – tumchaaditya May 22 '12 at 10:52
  • Ok, that is odd. I'm running Chrome 19.0.1084.46 m, AHK Perhaps a version specific issue. Or just something entirely random. – Bob May 22 '12 at 11:06
  • You may have to run an AHK script with Administrator privileges to override any keyboard hooks a program may be using. For example, Notepad++ is stubborn this way due to its macro features. – iglvzx May 22 '12 at 23:04
  • @iglvzx Chrome shouldn't be hooking the right Windows key. In fact, most programs shouldn't. Unless he has a plugin installed? (hint to OP: try disabling plugins to test) – Bob May 23 '12 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.