Jump to content

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

run, c:\ weirdness on windows 7 x64


  • Please log in to reply
2 replies to this topic
Mr_and_Mrs_D
  • Members
  • 164 posts
  • Last active: May 08 2013 08:09 PM
  • Joined: 19 Dec 2006
[Moderator's note: Moved topic from Bug Reports to Ask for Help.]

a very simple script like :
#+C::run,c:\
works as expected while this :
+#C::run, C:\
; +#D::Gosub,ExploreDrive ; Explore Drive D:

ExploreDrive:
; lastkey=%A_THISHOTKEY%
; StringRight,Drv,LastKey,1
; Driv=%DRV%:\
; ifExist,%Driv%
	; Run,%Driv%
; else
; {	 
	; Msgbox,16,[HotKey for Drive %Driv%],%Driv% is NOT Accessible!
; }
return
gives focus to the column headers in windows explorer instead of its ex-SysTreeView321 (the files/folders list) - I have the details view in c:\

That's weird - please confirm !
Windows 7 Home & Professional - AHK 1.0.48.5

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
Firstly, Run launches the command. What happens after that generally has nothing to do with AutoHotkey.

Secondly, why is your second script commented out? As it is, it is identical in function to your first script. I presume you mean for us to uncomment it.

Finally, I get the same behaviour either way: the column header is focused. While I agree this is strange, you will get the same behaviour if you are holding Shift when you launch "C:\" using the Windows Run dialog or the quick-search box in the Start menu. Therefore, the solution is to wait for the Shift key to be released:
+#C::
    KeyWait Shift
    Run C:\
return


Mr_and_Mrs_D
  • Members
  • 164 posts
  • Last active: May 08 2013 08:09 PM
  • Joined: 19 Dec 2006

Firstly, Run launches the command. What happens after that generally has nothing to do with AutoHotkey.

Secondly, why is your second script commented out? As it is, it is identical in function to your first script. I presume you mean for us to uncomment it.

Finally, I get the same behaviour either way: the column header is focused. While I agree this is strange, you will get the same behaviour if you are holding Shift when you launch "C:" using the Windows Run dialog or the quick-search box in the Start menu. Therefore, the solution is to wait for the Shift key to be released:

+#C::
    KeyWait Shift
    Run C:\
return

Thanks !
I commented it out to indicate the script this was coming from, but no - do not uncomment it ! I meant that just an empty label definition would cause this behaviour - sorry for the confusion :( !
In XP i had never a problem - but then Shift does not work this way in XP
I did try the
#+C::run,c:\
version and it didn't focus on the bar but still maybe I released shift early ? Will post back - not at 7 now.
And thanks for the workaround !!!
XP SP3 Pro x32 / 7 x64 Pro - AHK 1.0.48.05