I have a AHK script with many shortcuts that I have been using for years now.

Most of them are based on the winkey, for example:

; visual studio
visualStudio  = ahk_class wndclass_desked_gsk|Afx:400000:8:10011|SWT_Window0
GroupAdd ,visualStudioGroup  ,%visualStudio%
  DetectHiddenWindows, %MyDetect%

When I use these shortcuts, sometimes, but not always, the new Windows 8.1 start screen will popup and then I have to press the shortcut again to get back to the application I wanted to go to.

I was wondering, Is this a known issue? Is there a way to fix it?

Thanks in Advance.

  • Have you tried putting ahk_class wndclass_desked_gsk into its own group or calling it individually? It may be possible that the start menu is in one of the classes you've named. – Elliot DeNolf Nov 5 '13 at 13:32
  • @ElliotDeNolf Thanks. But it seems to not be the case. I have other groups with different classes that still do this. – Ben Nov 6 '13 at 7:33

Is there a way to fix it?

You need run the script as administrator, add this strings at the top of your script:

#SingleInstance, Ignore
IfEqual, A_IsAdmin, % False, Run, % "*RunAs """A_ScriptFullPath """",, UseErrorLevel
IfEqual, A_IsAdmin, % False, ExitApp
; Your code below...
  • nice! Thanks! So only admins can override that start screen hotkey? wierd... – Ben Nov 7 '13 at 10:22
  • 2
    Your script should have the same rights of access that the active application, or higher (that better). – Grey Nov 7 '13 at 18:38

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.