Advertisement
anonymous1184

colorize

Sep 5th, 2021
639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AddingCarets := false
  2.  
  3. return ; End of auto-execute
  4.  
  5. Add_Carets:
  6.    Send {^ 2}
  7. return
  8.  
  9. ^t::
  10.     AddingCarets := true
  11.     SetTimer Add_Carets, 500
  12. return
  13.  
  14. Esc::
  15. Enter::
  16.     SetTimer Add_Carets, Off
  17.     if AddingCarets
  18.     {
  19.         bak := ClipboardAll
  20.         Clipboard := ""
  21.         AddingCarets := false
  22.         Send +{Up}^c
  23.         ClipWait
  24.         str := Clipboard
  25.         str := RegExReplace(str, "\^{2,}", "^^")
  26.         while InStr(str, "^^")
  27.         {
  28.             Random rnd, 1, 3
  29.             str := StrReplace(str, "^^", "^" rnd,, 1)
  30.         }
  31.         Clipboard := str
  32.         Send ^v
  33.         Sleep 100
  34.         Clipboard := bak
  35.     }
  36.     Send % "{" A_ThisHotkey "}"
  37. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement