Advertisement
Guest User

Panic Button by Prodavec

a guest
Oct 12th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;*******************************************************************************
  2. ;* Project:          Path of Exile - Custom Macroses
  3. ;* Module:           P_macros_panic.ahk
  4. ;* Project version:  [1.0.0] 01.12.2018
  5. ;* Module version:   [20]    12.10.2019
  6. ;* Author:           Prodavec
  7. ;* Comments:         Lightweighted version
  8. ;*******************************************************************************
  9.  
  10. #SingleInstance, force
  11.  
  12. g_KeyState_Space := false
  13. g_KeyState_AppsKey := false
  14.  
  15. *AppsKey::
  16. {
  17.     if (!g_KeyState_AppsKey)
  18.     {
  19.         g_KeyState_AppsKey := true
  20.  
  21.         Critical, On
  22.         RunWait, g:\Disconnect\cports.exe /close * * * * PathOfExile_x64.exe
  23.     }
  24.  
  25.     return
  26. }
  27.  
  28. *AppsKey Up::
  29. {
  30.     g_KeyState_AppsKey := false
  31.     return
  32. }
  33.  
  34. ;Nested #if directive is not possible, check "#If [AHK_L]" documentation
  35. #If (WinActive("ahk_class POEWindowClass") and GetKeyState("CapsLock", "T"))
  36.  
  37. *Space::
  38. {
  39.     if (!g_KeyState_Space)
  40.     {
  41.         g_KeyState_Space := true
  42.  
  43.         Critical, On
  44.         RunWait, g:\Disconnect\cports.exe /close * * * * PathOfExile_x64.exe
  45.     }
  46.  
  47.     return
  48. }
  49.  
  50. *Space Up::
  51. {
  52.     g_KeyState_Space := false
  53.     return
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement