Pages

Saturday 28 November 2015

clearing screen & pasting using "CTRL + v" in windows command prompt.

Things become quite frustating when you just migrated from linux desktop world to windows world!
Specially tasks which uses terminal or command prompt(in windows) ... So, today i found these two awesome script's of autohotkey.. todo these tasks same as we do in linux world.
Simply download autohotkey from https://autohotkey.com and make two scripts with .ahk extension for example for pasting in terminal make copypaste.ahk and for clearing screen make clearingscreen.ahk and add the following code in both the file

;-----------------------------------------------------------------------------------------------------------------
;for pasting data

#IfWinActive ahk_class ConsoleWindowClass
^V::
SendInput {Raw}%clipboard%
return
#IfWinActive.
;-----------------------------------------------------------------------------------------------------------------

;for clearing screen in command prompt
; -------------------------------------------------------------------------
; Cntr-L should clear screen
; -------------------------------------------------------------------------
#IfWinActive ahk_class ConsoleWindowClass
^L::
Send cls{Enter}
return

#IfWinActive
;---------------------------------------------------------------------------------------------------------------------

After making these two files just double click and run 'em! thats it.
WARNING:- Things will easily break and become serious pain in head if you run vagrant ... so tip is suspend them from the arrow(in TASKBAR). Thanks!

No comments:

Post a Comment