topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday March 18, 2024, 11:09 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: DriveKeysAtoZ  (Read 17689 times)

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
DONE: DriveKeysAtoZ
« on: April 23, 2007, 03:34 AM »
This little tool sounds rather redundant, but I really do have a need for it.

Something that will open Explorer when I hit Win+E.

I am not sure why, and I don't think I will ever find out why, but Win+E doesn't open Explorer like it should.

I know you can over-ride the Win key and make a combo like Win+E do something else other than open Explorer, but can you make Win+E open Explorer, by force, with an ahk script when Windows decides that it doesn't want to do that any more?

I sure could use a little utility that would do that.  :-*

Or even better:

How about one that when I hit [something] + a letter, it will open Explorer to that drive letter (if it exists) AND fix the Win+E problem?


[edited by Wordzilla to change topic name, as per topic starter's request]
« Last Edit: May 21, 2007, 12:25 AM by Wordzilla »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #1 on: April 23, 2007, 03:47 AM »
#e::Run,explorer
:)

As for the letters, i think it'd be a bit easier if you said which letters you'd like it to work.
(i don't think i can recognize if there are any disks or not).
I recoment '<' to be the 'something' you mentioned, since it's not that much used. (notice that it'd still work alone, it just wouldn't work for repetition).

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #2 on: April 23, 2007, 04:03 AM »
#e::Run,explorer
:)

As for the letters, i think it'd be a bit easier if you said which letters you'd like it to work.
(i don't think i can recognize if there are any disks or not).
I recoment '<' to be the 'something' you mentioned, since it's not that much used. (notice that it'd still work alone, it just wouldn't work for repetition).

thanks....I'll have to test and see if this works and get back to you.

As for the drive letters, I don't know what kind of error handling is in ahk and what would happen if you tried a key combo for a drive that didn't exist. That was the only reason why I said that.

I have drive letters from C - T on this pc...but sometimes they can go as high as X (maybe even higher in the future). It depends what hard drive I have in the external caddy and if it is switched on or not...or how many virtual drives I have mounted...or what PC I am using.

The other pc runs 9x and has drive letters from A - J (no B), but that fluctuates, too, for the same reasons.


app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #3 on: April 23, 2007, 04:27 AM »
#e::Run,explorer
:)

It works (yay!), but it always opens to the My Documents folder instead of My Computer, which is what I would rather have. Any way of being able to specify that?  :tellme:

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #4 on: April 23, 2007, 04:56 AM »
 :) Try adding /e,<path>.

#c:Run,Explorer.exe /e,C:\
#d:Run,Explorer.exe /e,D:\
#e:Run,Explorer.exe /e,E:\

Skrommel

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #5 on: April 23, 2007, 05:05 AM »
ok...figured out how to get it to open in My Computer:

#e::Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d}  ; Opens the "My Computer" folder.

:) Try adding /e,<path>.

#c:Run,Explorer.exe /e,C:\
#d:Run,Explorer.exe /e,D:\
#e:Run,Explorer.exe /e,E:\

Skrommel

There has to be something better than 25 lines to handle this...no?

And what happens if I add a drive that doesn't exist and someone hits that key combo?

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
DONE: DriveKeysAtoZ
« Reply #6 on: April 23, 2007, 09:32 AM »
I seem to have filled my own request...with my first ahk script:

a2z.png

DriveKeysAtoZ:

Key combo of Right Ctrl + <letter from A to Z> will open Explorer to the root of that drive.

If you don't have a drive of that letter or if it is an empty removable media drive, it will tell you that you don't have a drive of that letter.

NOTE:
The combination of Right Ctrl and any other key will not work on 9x (sorry).
I am willing to change it if someone can come up with a better key to use instead of the Right Ctrl key. I only chose that one because it's least likely to conflict with any of my existing application hotkeys or my typing style.



Thank you jgpaiva and skrommel for your help.

Download it here.
« Last Edit: February 26, 2019, 05:06 AM by app103 »

AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #7 on: April 23, 2007, 01:45 PM »
Hi App103,

I've been meaning to do something like this when I got around to it.  Now I don't have to, very handy!

Some DonationCredits on the way...

Andy

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #8 on: April 25, 2007, 01:53 AM »
 :) Very nice, App103! Here's a more compact version of your script.

#NoEnv
#SingleInstance,Force
SetBatchLines,-1

Loop,% Asc("Z")-Asc("A")+1
{
  drive:=Chr(Asc("A")+A_Index-1)
  Hotkey,RCtrl & %drive%,OPEN
}
Return

OPEN:
StringTrimLeft,drive,A_ThisHotkey,8
IfNotExist, %drive%:\
  TrayTip,,You do not have an %drive%: drive
Else
{
  TrayTip,,Exploring the %drive%: drive
  Run,Explorer.exe /e`,%drive%:\
}
Return

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #9 on: April 25, 2007, 02:51 AM »
skrommel:

is there any reason why you used this:
Run,Explorer.exe /e`,%drive%:\

instead of this? (this is how it says to do it in the ahk help file)
Run,explore %drive%:\

Also, I had to get rid of those TrayTips...they make my very large hidden taskbar fly out halfway across the screen.

I would rather there be no message to the user at all when it is successful...just do what it is supposed to do and open it...and give a message box if it fails instead of a traytip.

new version with changes:

#NoEnv
#SingleInstance,Force
SetBatchLines,-1

Loop,% Asc("Z")-Asc("A")+1
{
  drive:=Chr(Asc("A")+A_Index-1)
  Hotkey,RCtrl & %drive%,OPEN
}
Return

OPEN:
StringTrimLeft,drive,A_ThisHotkey,8
IfNotExist, %drive%:\
  MsgBox You do not have an %drive% drive.
Else
{
  Run,explore %drive%:\
}
Return

Of course this compact version introduces one of the errors of English grammar that annoys me the most into the message box (a/an mis-usage).  :-[

nite_monkey

  • Member
  • Joined in 2006
  • **
  • Posts: 753
    • View Profile
    • Just Plain Super
    • Read more about this member.
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #10 on: April 25, 2007, 01:23 PM »
With that english grammar error, just change it to say drive letter %drive% doesn't exist or somthing like that, completly removing the a/an problem all together.
[Insert really cool signature here]

jah

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 15
  • i->c();
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #11 on: April 26, 2007, 03:53 AM »
Nice tool April, keep up the good work!!

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #12 on: April 26, 2007, 05:31 PM »
Jah...
http://img147.imageshack.us/img147/9548/tyflowers001jg2.jpg
DONE: DriveKeysAtoZ

  :)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #13 on: May 21, 2007, 12:05 AM »
wow, this is very handy.. :Thmbsup: btw, Salamander has something like this, e.g. Ctrl+A to open drive a etc.. however i couldn't have found this if i hadn't some time to kill.. :) so i'd like to suggest that maybe the title should be changed to reflect the script's name/function and add a "Done" to it so that more people will able to locate this.. :)

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #14 on: May 21, 2007, 12:11 AM »
I attempted to do that here:  https://www.donation...12.msg58698#msg58698

You will notice I changed the topic name to "DONE: DriveKeysAtoZ" but it didn't seem to stick.  :huh:

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: little AHK tool to force Windows to do what it should
« Reply #15 on: May 21, 2007, 12:20 AM »
You will notice I changed the topic name to "DONE: DriveKeysAtoZ" but it didn't seem to stick.
yes, i see that now.. maybe this is a job for the moderators.. you can report yourself via the "Report to moderator" link and request for the change, i think.. :)