Last active
April 26, 2021 15:50
-
-
Save JoeGlines/de10e471b9b722624422cb7a2380b189 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
;******************************************************* | |
#SingleInstance, Force | |
;https://www.autohotkey.com/boards/viewtopic.php?t=501 by just me | |
#Include C:\Users\Joe\Dropbox\Progs\AutoHotkey_L\Lib\_No Longer used\UNC_Network_Drives.ahk | |
loop, 26 { | |
Alpha:=Col_To_Char(A_Index) | |
Drive:=Alpha ":\" | |
IfExist, %Drive% | |
Open_Drives.=Alpha ":|" | |
} | |
StringTrimRight, Open_Drives, Open_Drives, 1 ; remove last pipe | |
Gui, Add, Text, x5 y0 w250 , What Drive do you want to see mapping for? | |
Gui, Add, DropDownList, x5 y20 vDrive, %Open_drives% | |
Gui, Add, Button, Default, OK | |
Gui, Add, Button, ,Cancel | |
gui show, , Select drive | |
Return | |
ButtonSelect: | |
FileSelectFolder, Fold | |
GuiControl,, Folder, %Fold% | |
return | |
ButtonCancel: | |
Gui, Destroy | |
Gosub Exitter | |
Return | |
ButtonOK: | |
Gui, Submit | |
Gui, Destroy | |
Clipboard:=DriveMap.Get(Drive) | |
MsgBox, % "The clipboard now holds the path to " Drive " which is: " DriveMap.Get(Drive) | |
gosub Exitter | |
return | |
Exitter: | |
ExitApp | |
Return | |
Col_To_Char(Index){ ;Converting letters to number | |
return Index<=26?(Chr(64+index)):Index>26?Chr((index-1)/26+64) . Chr(mod((index - 1),26)+65):"" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment