qharr

Untitled

May 4th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. '<=== This gate-keeps the entire section between If and End If. Only if the o/u tab is visible should the code below, between If and Else be executed. If you cannot see an O/U tab then code should go direct to Else part.
  2.  
  3. If .document.querySelector("#bettype-tabs li:nth-of-type(5)").getAttribute("style") = "display: block;" Then '<<<<< o/u tab visible
  4.  
  5. .document.querySelector("#bettype-tabs li:nth-of-type(5) span").FireEvent "onmousedown" 'over/under '<==switch to o/u tab
  6.  
  7. Do
  8. Loop Until .document.querySelector(".table-chunk-header-dark").getAttribute("style") = "display: block;" '<==wait for o/u tab to become dark shaded
  9.  
  10. .document.querySelector("[onclick*='P-2.50-0-0']").Click '<==click desired option
  11.  
  12. While .Busy Or .readyState < 4: DoEvents: Wend
  13.  
  14. Dim oddOver As String, oddUnder As String
  15.  
  16. Set averages = .document.querySelectorAll(".aver td")
  17. oddOver = "'" & averages.item(2).innerText
  18. oddUnder = "'" & averages.item(3).innerText
  19.  
  20. Else '<================================================================================o/u tab not visible
  21. oddOver = "No odds"
  22. oddUnder = "No odds"
  23. End If
Add Comment
Please, Sign In to add comment