Merlin_R

Remove Skype Emoji.au3

Nov 15th, 2016
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.23 KB | None | 0 0
  1. #cs ----------------------------------------------------------------------------
  2.  
  3.  AutoIt Version: 3.3.14.2
  4.  Author:         Merlin Reichwald
  5.  
  6.  Script Function:
  7.     Make Emoji Great Again (and fix the cat face, seriously M$?)
  8.  
  9. #ce ----------------------------------------------------------------------------
  10.  
  11. #include <Misc.au3>
  12.  
  13. _Singleton( "Remove Skype Emoji", 0 )
  14.  
  15. Func AdditionalCharOnSkype()
  16.   Local $title = WinGetTitle( "" )
  17.  
  18.   HotKeySet( @HotKeyPressed )
  19.   Send( @HotKeyPressed )
  20.  
  21.   If StringInStr( $title, "skype" ) Then
  22.     Send( "​" ); Zero Width Space, not empty string
  23.   EndIf
  24.  
  25.   HotKeySet( @HotKeyPressed, "AdditionalCharOnSkype" )
  26.  
  27. EndFunc
  28.  
  29. Func RegisterAutoStart( $path, $title, $global = 0 )
  30.  
  31.   Local $root = "HKCU"
  32.  
  33.   If $global Then
  34.     ;#RequireAdmin
  35.     $root = "HKLM"
  36.   EndIf
  37.  
  38.   RegWrite( $root & "\Software\Microsoft\Windows\CurrentVersion\Run", $title, "REG_SZ", $path )
  39.  
  40.  
  41. EndFunc
  42.  
  43. If @Compiled Then
  44.   RegisterAutoStart( @AutoItExe, "Remove Skype Emoji" )
  45. EndIf
  46.  
  47. HotKeySet( ":", "AdditionalCharOnSkype" )
  48. HotKeySet( ";", "AdditionalCharOnSkype" )
  49. ; Uncomment this to remove skype emoji like (cool)
  50. ; HotKeySet( "(", "AdditionalCharOnSkype" )
  51.  
  52. While 1
  53.   Sleep( 30 )
  54. WEnd
Advertisement