Advertisement
Guest User

Autoit ROT13 Instant Translation

a guest
Mar 29th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.91 KB | None | 0 0
  1. #cs ----------------------------------------------------------------------------
  2.  
  3.  AutoIt Version: 3.3.14.2
  4.  Author:         Christoph
  5.  
  6.  Script Function:
  7.     Instant encrytion of typed text with ROT13 chiffre.
  8.  
  9. #ce ----------------------------------------------------------------------------
  10.  
  11. install("keyPressed")
  12. OnAutoItExitRegister("onExit")
  13.  
  14. While True
  15.     Sleep(1000)
  16. WEnd
  17.  
  18. Func keyPressed()
  19.     $c = Asc(StringLower(@HotKeyPressed)) + 13
  20.     If $c > (Asc("z")) Then $c -= (Asc("z") - Asc("a") + 1)
  21.     $c = Chr($c)
  22.     If (Asc(@HotKeyPressed) <= Asc("Z")) Then $c = StringUpper($c)
  23.     HotKeySet($c)
  24.     Send($c)
  25.     HotKeySet($c, "keyPressed")
  26. EndFunc   ;==>keyPressed
  27.  
  28. Func install($sFunction = "")
  29.     For $i = Asc("a") To Asc("z")
  30.         HotKeySet(Chr($i), $sFunction)
  31.     Next
  32.     For $i = Asc("A") To Asc("Z")
  33.         HotKeySet(Chr($i), $sFunction)
  34.     Next
  35. EndFunc   ;==>install
  36.  
  37. Func onExit()
  38.     install()
  39. EndFunc   ;==>onExit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement