Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0+
- #Include "E:\Documents\AHK\Automation\UIAutomation V2\Lib\UIA.ahk"
- #SingleInstance
- SetTimer CheckForReplay, 3000
- CheckForReplay()
- {
- if (WinExist("ahk_exe firefox.exe"))
- {
- winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
- if activeTab := winEl.ElementExist({Type:50000, Name:"Replay"})
- {
- winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
- if activeTab := winEl.ElementExist({Type:50000, Name:"Replay"})
- {
- winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
- if activeTab := winEl.ElementExist({Type:50000, Name:"Exit Fullscreen", matchmode:"SubString", casesense:0})
- {
- winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
- winEl.WaitElement({Type:50000, Name:"Exit Fullscreen", matchmode:"SubString", casesense:0}).click()
- }
- }
- winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
- button := winEl.FindElement({Type:"Button", Name:"Season", matchMode:"SubString"})
- winEl.WaitElement({Type:50000, Name:"Season", matchmode:"SubString"}).click()
- season := StrSplit(button.Name, " ")[2]
- season := season[button.Count() + 1]
- season.WaitElement.click()
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment