fludp

Untitled

Apr 28th, 2023
1,508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Requires AutoHotkey v2.0
  2.  
  3. global _chatFlag := 0 ; chat must be close when we start script
  4.  
  5. If WinActive("ahk_class Transformice")
  6. {
  7.     SC012:: ; hook E button
  8.     {
  9.         global
  10.         If (_chatFlag) ; chat is open then send E key
  11.             {
  12.                 Send "{vk45sc012}"
  13.             }
  14.         Else ; chat is not open send Shift+E key
  15.             {
  16.                 Send "{Shift down}{vk45sc012}{Shift up}" ; hurray
  17.             }
  18.     }
  19.  
  20.     ~Enter:: ; hook enter for chat flag
  21.     {
  22.         global
  23.         _chatFlag:=!_chatFlag
  24.     }
  25. }
  26.  
  27. *f2::Reload     ; just reload script
  28. *esc::ExitApp   ; just close script
Advertisement
Add Comment
Please, Sign In to add comment