Last active
March 31, 2017 23:57
-
-
Save renatoch/9424e795b25e381f3eafb5f9aba79871 to your computer and use it in GitHub Desktop.
Auto Hotkey (AHK) script to paste clipboard content removing non alphanumeric caracters (Hotkey - Ctrl + Alt + Shift + T)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; To be used to paste CPF / CNPJ / bar code copied to clipboard | |
$^+!t:: | |
Sleep, 100 | |
ClipSaved := ClipboardAll ;save original clipboard contents | |
Clipboard := RegExReplace(Clipboard, "[^a-zA-Z0-9]", "") | |
Sleep, 100 | |
Send ^v ;send the Ctrl+V command | |
Sleep, 100 | |
Clipboard := ClipSaved ;restore the original clipboard contents | |
ClipSaved = ;clear the variable | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment