Tuesday, September 19, 2017

Paste different values using Autohotkey


I am new to AutoHotKey, but I think this scenario is best suited to use AutoHotKey.
I have to repeatedly paste 2 values in 2 different columns in a application,
e.g. I have to paste value1 in cloumn1 and value2 in column2.....
so I need a script to paste value1 when I press Q and paste value2 when I press W (as they are close to tab key).


Thanks
Kiran.


Answer



Simple hotkeys can accomplish this.


q::Send, value1
w::Send, value2

However, you may also want to use #IfWinActive for your application or possibly use some modifiers on your keys just in case you actually need to type q or w in the spreadsheet or in another application.


SetTitleMatchMode, 2
#IfWinActive ahk_class XLMAIN ;Microsoft Excel
!q::Send, value1 ;Alt + q
!w::Send, value2 ;Alt + w
#IfWinActive

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...