antonio_pedro

[ED] Anti-AFK

Dec 9th, 2025
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Awk 1.35 KB | Source Code | 0 0
  1. ; --- INÍCIO DO BLOCO DE ADMINISTRADOR ---
  2. if not A_IsAdmin
  3. {
  4.    Run *RunAs "%A_ScriptFullPath%"
  5.    ExitApp
  6. }
  7. ; --- FIM DO BLOCO DE ADMINISTRADOR ---
  8.  
  9. #Persistent
  10. SetTitleMatchMode, 2
  11. SetKeyDelay, 50, 50
  12.  
  13. ; Configuração: Roda a cada 10 minutos (600000 ms)
  14. SetTimer, EnviarComando, 600000
  15. Return
  16.  
  17. ; --- COMANDO DE TESTE MANUAL (F1) ---
  18. ; Aperte F1 para testar se está enviando corretamente agora
  19. F1::
  20.     SoundBeep, 750, 200
  21.     GoSub, EnviarComando
  22. Return
  23.  
  24. ; --- A LÓGICA DO ENVIO ---
  25. EnviarComando:
  26.     NomeDaJanela := "Artix Game Launcher"
  27.    
  28.     ; DetectHiddenWindows ajuda caso a janela esteja minimizada
  29.     DetectHiddenWindows, On
  30.  
  31.     IfWinExist, %NomeDaJanela%
  32.     {
  33.         ; --- PARTE 1: Envia /fameall ---
  34.         ControlSend,, {Enter}, %NomeDaJanela%
  35.         Sleep, 1000 ; Espera o chat abrir
  36.         ControlSend,, /fameall, %NomeDaJanela%
  37.         Sleep, 500
  38.         ControlSend,, {Enter}, %NomeDaJanela%
  39.        
  40.         ; Espera 2 segundos para não enviar tudo de uma vez
  41.         Sleep, 2000
  42.        
  43.         ; --- PARTE 2: Fala "Olá" ---
  44.         ControlSend,, {Enter}, %NomeDaJanela%
  45.         Sleep, 1000
  46.         ControlSend,, Olá, %NomeDaJanela%
  47.         Sleep, 500
  48.         ControlSend,, {Enter}, %NomeDaJanela%
  49.        
  50.         ; Bip para confirmar que rodou
  51.         SoundBeep, 1000, 200
  52.     }
  53. Return
Add Comment
Please, Sign In to add comment