Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !^+#v:: ;; When you hit alt-control-shift-win-V, the commands below are triggered.
- Sleep 500 ;; Remove this long sleep if the hotkey is triggered by a mouse gesture; it should only be needed if you type the hotkey by hand.
- Sleep 50
- Send {control up}{alt up}{rwin up}{shift up}
- ClipSave := ClipboardAll ;; This saves whatever you have on your clipboard for later.
- Clipboard := ""
- Send {control down} ;; Copy (control-C) whichever item you have selected in order to get the path of a folder, if present.
- Sleep 50
- Send c
- Sleep 50
- Send {control up}
- FilePath := Clipboard ;; Here we take the path of the selected item from the clipboard in order to analyse it (folder or not?).
- FileGetAttrib, Attributes, %FilePath%
- If Instr(Attributes, "D") ;; If the selected item is a folder/directory, execute "paste" from the right-click menu, using Cautomaton.
- {
- Clipboard := ClipSave
- Run, D:\Programs\Cautomaton (0.9.0)\cautomaton32.exe /v paste `"%FilePath%`", , Hide ;; Replace the part before "cautomaton32.exe" with the location of your Cautomaton file.
- }
- Else ;; Do normal paste action, control-V.
- {
- Sleep 50
- Send {control down}
- Sleep 50
- Send v
- Sleep 50
- Send {control up}
- }
- Sleep 100
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement