Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- #SingleInstance force
- #Persistent
- Menu, Tray, Icon, glol.ico
- CoordMode, Pixel, Screen
- CoordMode, Mouse, Screen
- cdots:=1
- dots:=.
- ; /////////// GUI
- Gui, Font, s14 c0xff00 w700, Tahoma
- Gui, add, Text, x10 y10 w280 h20 +Center +BackgroundTrans vVar,
- Gui, Font
- Gui, Add, Button, x10 y40 w120 h40, Run
- Gui, Add, Button, x150 y40 w120 h40, Stop
- Gui, Show, Center w281 h90, LoL Auto Accept
- Return
- Go:=False
- ; if on checks for accept button every 3 sec, if found it turn itself off
- aAccept:
- if Go
- {
- SetTimer, aAccept, Off
- ImageSearch, x, y, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *20 Accept.png
- If (!ErrorLevel)
- {
- BlockInput, on
- MouseMove, x+20, y+10
- Sleep, 100
- MouseClick, left
- Sleep, 100
- MouseClick, left
- BlockInput, off
- found()
- } else {
- ImageSearch, x, y, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *20 acceptar.png
- If (!ErrorLevel)
- {
- BlockInput, on
- MouseMove, x+20, y+10
- Sleep, 100
- MouseClick, left
- Sleep, 100
- MouseClick, left
- BlockInput, off
- found()
- } else {
- SetTimer, aAccept, 3000
- }
- }
- }
- return
- refreshText:
- SetTimer, refreshText, Off
- if Go
- {
- GuiControl,, Var, Waiting For a Match%dots%
- if (cdots < 3){
- dots.=.
- cdots:=cdots+1
- }
- else {
- dots:=""
- cdots:=0
- }
- SetTimer, refreshText,500
- }
- ButtonRun:
- if !Go
- {
- TrayTip, Looking for match,Looking for match ,10
- Go:=True
- SetTimer, aAccept, -10
- SetTimer, refreshText, -10
- }
- return
- ButtonStop:
- stop()
- Return
- GuiClose:
- ExitApp
- stop(){
- global
- Go:=False
- GuiControl, hide, Var
- SetTimer, refreshText, Off
- SetTimer, aAccept, Off
- }
- found(){
- global
- stop()
- GuiControl,show, Var,
- GuiControl,, Var, Match Found !
- TrayTip, Match Found! , LOL Match Found! ,10
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement