DeletusCletus

Untitled

Sep 20th, 2023
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. #Requires AutoHotkey v2.0+
  2. #Include "E:\Documents\AHK\Automation\UIAutomation V2\Lib\UIA.ahk"
  3. #SingleInstance
  4. SetTimer CheckForReplay, 3000
  5.  
  6. CheckForReplay()
  7. {
  8. if (WinExist("ahk_exe firefox.exe"))
  9. {
  10. winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
  11. if activeTab := winEl.ElementExist({Type:50000, Name:"Replay"})
  12. {
  13. winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
  14. if activeTab := winEl.ElementExist({Type:50000, Name:"Replay"})
  15. {
  16. winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
  17. if activeTab := winEl.ElementExist({Type:50000, Name:"Exit Fullscreen", matchmode:"SubString", casesense:0})
  18. {
  19. winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
  20. winEl.WaitElement({Type:50000, Name:"Exit Fullscreen", matchmode:"SubString", casesense:0}).click()
  21. }
  22. }
  23. winEl := UIA.ElementFromHandle("ahk_exe firefox.exe")
  24. button := winEl.FindElement({Type:"Button", Name:"Season", matchMode:"SubString"})
  25. winEl.WaitElement({Type:50000, Name:"Season", matchmode:"SubString"}).click()
  26. season := StrSplit(button.Name, " ")[2]
  27. season := season[button.Count() + 1]
  28. season.WaitElement.click()
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment