Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Last active April 26, 2021 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeGlines/b759cd487d2aa552e8ad8dd17a669ed4 to your computer and use it in GitHub Desktop.
Save JoeGlines/b759cd487d2aa552e8ad8dd17a669ed4 to your computer and use it in GitHub Desktop.
get path to selected file
;*******************************************************
; 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 ;AutoHotkey Webinar
#IfWinActive ahk_class CabinetWClass ;Explorer window
^+c:: ;Copy explorer path to clipboard
clipboard = ; Empty the clipboard
SendInput, ^c ;changd from Send 11/23
ClipWait, 1
If ErrorLevel ;Added errorLevel checking
MsgBox, No text was sent to clipboard Return
clipboard="%clipboard%"
;***********for UNC &DropBox*******************
IfEqual, A_UserName,joe,StringReplace,Clipboard,Clipboard,B:,C:\DropBox ;Joe
IfEqual, A_UserName,a0225522,StringReplace,Clipboard,Clipboard,E:,\\DFLFS04\email ;Joe Return
#IfWinActive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment