Updated for a change in one of the window titles and an additional pause to make it more reliable.
If you have a ton of requests you might want to reduce all the
sleep, 1000
statements to
sleep, 200
or something.
Code:
#SingleInstance, Force
#Persistent
#NoEnv
; Create the gui
Gui, Add, Edit, H200 W200
Gui, Add, Button, w56 h20 gGo, &Go
gui, show,, Tournament Summary Requester
return
Go:
; Get list tourn from text box
ControlGetText, Tourn_List, Edit1, Tournament Summary Requester
; Loop through tourn list
Loop, parse, Tourn_List, `n, `r
{
; Select the Tournament History Requests menu item
WinMenuSelectItem, PokerStars Lobby,, Requests, Tournament History...
; Wait for the Tournament History Requests item to popup
WinWait, Tournament History ahk_class #32770,
; Click the radio button for Tournament ID. Repeat until selected (ControlClick is unreliable, probably a better way of doing this)
loop
{
Enabled = 0
ControlGet, Enabled, Enabled, , Edit2, Tournament History
IF (Enabled == 0)
ControlClick, Button2, Tournament History
ELSE
break
sleep, 1000
}
sleep, 1000
; Enter the tourn ID into the text box
ControlSetText, Edit2, %A_LoopField%, Tournament History
sleep, 1000
Click the OK button
ControlClick, Button4, Tournament History
sleep, 1000
; Wait for the message box
WinWait, PokerStars ahk_class #32770,,PokerStars
sleep, 1000
; Click OK on message box
ControlClick, Button1, PokerStars ahk_class #32770,,,,PokerStars Lobby
sleep, 1000
}
MsgBox, Done!
return