Skip to content

Instantly share code, notes, and snippets.

@Saoneth
Created October 6, 2017 21:34
Show Gist options
  • Save Saoneth/6b19c86a531b795bd230a143bbaa54bc to your computer and use it in GitHub Desktop.
Save Saoneth/6b19c86a531b795bd230a143bbaa54bc to your computer and use it in GitHub Desktop.
Paste using alt+v in putty
Func ActiveProcess()
Local $Processlist = ProcessList()
Local $Pid = WinGetProcess(WinGetHandle("[active]"))
For $i = 1 To $Processlist[0][0]
If $Processlist[$i][1] = $Pid Then Return $Processlist[$i][0]
Next
EndFunc
Func PuttyPaste()
If ActiveProcess() = "putty.exe" Then Send("{LSHIFT down}{INSERT}{LSHIFT up}")
EndFunc
HotKeySet("!v", "PuttyPaste");
While 1
Sleep(100000)
WEnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment