Guest User

Untitled

a guest
Feb 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. #NoEnv
  2. #SingleInstance force
  3. BBs := 32 ;How many BBs to buy in for
  4.  
  5. WinGet, pid, PID, PokerStars Lobby
  6. WinGet, id, list, ahk_pid%pid%, , PokerStars Lobby
  7. SetTitleMatchMode, 2
  8. If (pid)
  9. {
  10. ;MsgBox, % "Found Lobby"
  11. }
  12. Else
  13. {
  14. MsgBox, % "Oops, PokerStars isn't open."
  15. Exit
  16. }
  17. Loop
  18. {
  19. WinWait, Buy-in ahk_pid%pid% ahk_class #32770
  20. WinGet, id, ID
  21. ControlClick, Button1, ahk_class #32770 ahk_id %ID%
  22. ControlSetText, Static6,,ahk_class #32770 ahk_id %ID%
  23. ControlSetText, Button2,,ahk_class #32770 ahk_id %ID%
  24. ControlClick, Button3, ahk_class #32770 ahk_id %ID%
  25.  
  26. ControlGetText, BuyStr, Static2, ahk_class #32770 ahk_id %ID%
  27. StringGetPos, pos, BuyStr, $
  28. pos += 1
  29. StringTrimLeft, MinBuy, BuyStr, %pos%
  30. BuyStr := MinBuy
  31. StringGetPos, pos, BuyStr, $
  32. pos += 1
  33. StringTrimLeft, MinBuy, BuyStr, %pos%
  34.  
  35. buyin = 1
  36. buyin *= BBs * MinBuy
  37.  
  38. ControlSetText, Edit1, %buyin%, ahk_class #32770 ahk_id %ID%
  39. Sleep 50
  40. ControlClick, Button4, ahk_class #32770 ahk_id %ID%
  41. }
Add Comment
Please, Sign In to add comment