Skip to content

Instantly share code, notes, and snippets.

@click-here
Created April 15, 2017 17:32
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 click-here/bd1ac354e57da08dd3741178f2bae74b to your computer and use it in GitHub Desktop.
Save click-here/bd1ac354e57da08dd3741178f2bae74b to your computer and use it in GitHub Desktop.
F1::
Var := gst()
if (Var != "")
{
Run, "C:\full\path\to\open_with_pandas.py" %Var%
}
gst() { ; GetSelectedText or FilePath in Windows Explorer by Learning one
;https://autohotkey.com/board/topic/60723-can-autohotkey-retrieve-file-path-of-the-selected-file/
IsClipEmpty := (Clipboard = "") ? 1 : 0
if !IsClipEmpty {
ClipboardBackup := ClipboardAll
While !(Clipboard = "") {
Clipboard =
Sleep, 10
}
}
Send, ^c
ClipWait, 0.1
ToReturn := Clipboard, Clipboard := ClipboardBackup
if !IsClipEmpty
ClipWait, 0.5, 1
Return ToReturn
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment