Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Trouble with remapping default shortcuts in Windows 8.


  • Please log in to reply
6 replies to this topic
Win8
  • Members
  • 3 posts
  • Last active: Mar 20 2013 12:10 AM
  • Joined: 23 Feb 2013

I just installed windows 8 and it broke all a lot my scripts from windows 7.

 

I have scripts such as: 

#e::                                                            
if WinExist("ahk_class Explorer++.exe")   
    WinActivate, ahk_class Explorer++.exe
else
    Run, "C:\Program Files (x86)\Explorer++\Explorer++.exe"
    return 

 

This one was supposed to replace window's "open explorer" command (windows key + e) with an Explorer++. In windows 7, this script worked just fine but in windows 8, it would function really weirdly. Whenever I hit Win+E, it would open a normal explorer window. I have to double tap Win+E in order for the script to execute and open Explorer++. When I map it to a key that doesn't have a native windows function, it will execute just fine.  I have around 15ish hotkeys that's mapped with the Win key as the modifier and been using them daily for for 6 months now so remapping them all would really suck. 

 

 

I've tried searching google and the forums for an answer but after a day I still can't figure it out.

I've tried running as administrator and  disabling UAC to no avail.  Anyone got an idea of what I should do?



Lexikos
  • Administrators
  • 9442 posts
  • Last active:
  • Joined: 17 Oct 2006

Try adding #UseHook to your script.

 

If that doesn't work, try modifying AutoHotkey.exe with EnableUIAccess.ahk (AutoHotkey v1.1 is required to run the script).



Win8
  • Members
  • 3 posts
  • Last active: Mar 20 2013 12:10 AM
  • Joined: 23 Feb 2013

I tried both methods. #UseHook didn't do anything different. I tried EnableUIAcess with 1.1.09.03 and that didn't do anything either. I ran it and had it placed in C:\Program Files (x86)\ with no results then uninstalled and redid everything and no luck as well. The normal windows key functions are still firing with higher priority than my AHK functions.  

 

Are you running on Windows 8 (64bit)? If so, you should make a simple #e:: Run, notepad.exe script and see if you run into the same problem. 



Lexikos
  • Administrators
  • 9442 posts
  • Last active:
  • Joined: 17 Oct 2006

I have Windows 7 and no intention of "upgrading" to Windows 8.

 

I have Windows 8 RP 64-bit in a virtual machine, and the #e hotkey works just fine. However, I presume you are not running the Release Preview.



Lexikos
  • Administrators
  • 9442 posts
  • Last active:
  • Joined: 17 Oct 2006

I have now set up a virtual machine with Windows 8 RTM 64-bit, and the hotkey works as expected.

#e::Run notepad


Win8
  • Members
  • 3 posts
  • Last active: Mar 20 2013 12:10 AM
  • Joined: 23 Feb 2013

I finally figured it out. Here's to anyone visiting this thread in the future--hopefully you can save yourself a couple of hours of diagnostics frustration.

 

I observed the AHK's key log and realised that something was converting all physical strokes of the left win key into artificial.  AHK was just ignoring these strokes and Windows picked them up as default functions. After my trials and tribulations, I concluded that a third party start menu replacement app,  Power8, was doing this. I replaced the app with something else and all of my scripts started to work as intended. 

 

Thank you for your attention and help Lexikos. 



Oliver
  • Members
  • 262 posts
  • Last active: Mar 28 2014 06:41 PM
  • Joined: 07 Aug 2011

Hi Win8, 

 

I had a problem today and since then I cannot redefine #q as other purpose than the default of Windows 8.  the following script is not working:

 

 

#q::
IfWinExist Task Scheduler
WinActivate
else
Run %windir%\system32\taskschd.msc /s
WinActivate
return

 

Any hint?