Skip to content

Instantly share code, notes, and snippets.

@davebrny
Created November 13, 2017 10:37
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save davebrny/535d9a80afe0a0f8fba322b752a9f73c to your computer and use it in GitHub Desktop.
(autohotkey) - gets selected text (or path of selected file/folder)
get_selected(wait_time="0.3") {
revert_clipboard := clipboardAll
clipboard := "" ; clear first
send ^{c}
clipWait, % wait_time
selected := clipboard
clipboard := revert_clipboard
return selected
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment