Open Side Menu Go to the Top
Register
software to automatically request missing tournament summaries (stars) software to automatically request missing tournament summaries (stars)

02-09-2009 , 09:28 PM
Has anyone made a script or program that allows you to paste a list of tournament ids needing tournament summaries, and then it goes and requests each tournament history from stars?
software to automatically request missing tournament summaries (stars) Quote
02-10-2009 , 12:38 PM
bump with diminishing hope...
software to automatically request missing tournament summaries (stars) Quote
02-13-2009 , 05:34 PM
Code:
#SingleInstance, Force
#Persistent
#NoEnv


Gui, Add, Edit, H200 W200
Gui, Add, Button, w56 h20 gGo, &Go
gui, show,, Tournament Summary Requester

return

Go:
ControlGetText, Tourn_List, Edit1, Tournament Summary Requester
Loop, parse, Tourn_List, `n, `r
{
WinMenuSelectItem, PokerStars Lobby,, Requests, Tournament History...
WinWait, Tournament History ahk_class #32770, , 10
loop 
{
Enabled = 0
ControlGet, Enabled, Enabled, , Edit2, Tournament History
IF (Enabled == 0)
	ControlClick, Button2, Tournament History
ELSE
	break
sleep, 1000
}
sleep, 1000
ControlSetText, Edit2, %A_LoopField%, Tournament History
sleep, 1000
ControlClick, Button4, Tournament History
WinWait, PokerStars ahk_class #32770,,PokerStars Lobby
sleep, 1000
ControlClick, Button1, PokerStars ahk_class #32770,,,,PokerStars Lobby
}
MsgBox, Done!
return
software to automatically request missing tournament summaries (stars) Quote
02-13-2009 , 06:13 PM
You can get a list of tourneys needing summaries from PT3 with this SQL script.
Code:
select distinct  tourney_holdem_summary.tourney_no
 from tourney_holdem_summary
where id_table_type = 0
software to automatically request missing tournament summaries (stars) Quote
02-14-2009 , 02:06 PM
Awesome!!! thanks
software to automatically request missing tournament summaries (stars) Quote
02-15-2009 , 10:10 AM
Quote:
Originally Posted by Mark1978
You can get a list of tourneys needing summaries from PT3 with this SQL script.
Code:
select distinct  tourney_holdem_summary.tourney_no
 from tourney_holdem_summary
where id_table_type = 0
If I may,

Code:
SELECT tourney_holdem_summary.tourney_no as "tourney_no"
FROM tourney_holdem_summary WHERE
  ((SELECT sum(val_finish)
  FROM tourney_holdem_results thr WHERE
    thr.id_tourney = tourney_holdem_summary.id_tourney) = 0)
  AND tourney_holdem_summary.id_site in (100)
ORDER BY tourney_no DESC;
restricts the results to tourneys from PokerStars where no result has yet been entered. It puts the most recent ones (those with the highest tourney_no) on top.
I'm not 100% sure if id_site 100 is always PS, if it does not work do a

Code:
select * from lookup_sites;
and use id found there as id_site.

Regards
Palsh
software to automatically request missing tournament summaries (stars) Quote
02-16-2009 , 06:31 PM
Hey Mark,

is there a way to check if a request is still running in the client? The AHK skips a lot of the tourney numbers because the Requests->Tournament History is greyed out during a running request and some requests take a while.

Props though for the script, I bought PT3 early this year and still have to request more than a year's worth of tourney histories, so this is obviously very helpful.

Regards
Palsh

Edit: I think I found it, WinWait does not seem to relly wait if the "Seconds" parameter is omitted. So I changed
Code:
WinWait, PokerStars ahk_class #32770,,PokerStars Lobby
at the bottom of the script to
Code:
WinWait, PokerStars ahk_class #32770,,60,PokerStars Lobby
Obviously if one request takes more than a minute this will fail for the next tourney numbers, but it seems to be much more robust.

Last edited by Palsh; 02-16-2009 at 07:00 PM. Reason: Found it myself
software to automatically request missing tournament summaries (stars) Quote
02-17-2009 , 02:26 AM
Palsh,

Winwait should wait indefinitely with no time supplied.
AHK documentation

I think the problem is with not pausing before testing for the 'email has been sent' message window. The script sees the tourn history window before it closes and just continues. Try this:

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 Lobby History
sleep, 1000
; Click OK on message box
ControlClick, Button1, PokerStars ahk_class #32770,,,,PokerStars Lobby
}
MsgBox, Done!
return
software to automatically request missing tournament summaries (stars) Quote
02-19-2009 , 01:21 AM
I would like to get my missing tournament summaries into PT3 but I am struggling to figure out how to use whats in this thread. I dont have any experience using scripts so would appreciate it if someone explained how to use this. I have about 1000 tourneys i need to import summaries for so this would be greatly helpful.
software to automatically request missing tournament summaries (stars) Quote
02-19-2009 , 09:30 AM
Install AutoHotKey.
http://www.autohotkey.com/download/

Copy and paste the script into a text file using notepad and save it as whatever.ahk

For the SQL script, go to Start | All Programs | PostGreSQL 8.3 | PGAdmin III
Expand the tree on the right until you see you PT3 database. You might need a password probably dbpass unless you changed it.
Go to the Tools menu at the top and select Query Tool. Paste in Palsh's SQL script and click the green triangle execute query button. Copy the tourn list. Run the ahk and paste in. Make sure PS is loaded and logged in. Cross fingers. Use at own risk.
software to automatically request missing tournament summaries (stars) Quote
02-19-2009 , 05:06 PM
ok and what exactly are the risks associated with this?
software to automatically request missing tournament summaries (stars) Quote
02-24-2009 , 03:54 PM
Anyone know if this can be edited to request hand history's for specific tourney #?
software to automatically request missing tournament summaries (stars) Quote
07-20-2009 , 10:24 PM
I have a couple of hundred tourneys to import. SQL script works fine. However the ahk script does not...

using Vista Premium 64bit OS.

Has anyone tested the ahk script on the current stars client?

-Callahan-
software to automatically request missing tournament summaries (stars) Quote
07-24-2009 , 07:35 PM
I have to babysit the ahk script a bit, if the box saying "tournament summary sent to x@y.com" doesn't pop up right away, it won't request the next tournament by itself.

Really great work, this helped me out a ton. Thanks.
software to automatically request missing tournament summaries (stars) Quote
07-27-2009 , 08:10 AM
I wanted to import some hand histories that I am missing. I tried to update the code, I get the tournament ID, but I'm not getting the script to click the ok button. Can anyone update this for me? If anyone is interested, I emailed support for a listing of tournament ids for a certain period. Then I used the script for tournaments needing results and changed = 0 to > 0 to find all tourneys in my database. I then did a vlookup from my list to pstars list to find the hand histories I was missing. Am now hoping I can get the importer script updated to import a listing of hand history. Thanks for this post, it was really awesome, I imported 600 + tourneys I needed results for.

Craig

[CODE]#SingleInstance, Force
#Persistent
#NoEnv


Gui, Add, Edit, H200 W200
Gui, Add, Button, w56 h20 gGo, &Go
gui, show,, Tournament Summary Requester

return

Go:
ControlGetText, Tourn_List, Edit1, Tournament Summary Requester
Loop, parse, Tourn_List, `n, `r
{
WinMenuSelectItem, PokerStars Lobby,, Requests, Hand History...
WinWait, Hand History ahk_class #32770, , 10
loop
{
Enabled = 0
ControlGet, Enabled, Enabled, , Edit2, Hand History
IF (Enabled == 0)
ControlClick, Button4, Hand History
ELSE
break
sleep, 1000
}
sleep, 1000
ControlSetText, Edit2, %A_LoopField%, Hand History
sleep, 1000
ControlClick, Button2, Hand History
WinWait, PokerStars ahk_class #32770,,PokerStars Lobby
sleep, 1000
ControlClick, Button1, PokerStars ahk_class #32770,,,,PokerStars Lobby
}
MsgBox, Done!
return
software to automatically request missing tournament summaries (stars) Quote
08-06-2009 , 01:43 PM
Quote:
Originally Posted by Mark1978
Install AutoHotKey.
http://www.autohotkey.com/download/

Copy and paste the script into a text file using notepad and save it as whatever.ahk

For the SQL script, go to Start | All Programs | PostGreSQL 8.3 | PGAdmin III
Expand the tree on the right until you see you PT3 database. You might need a password probably dbpass unless you changed it.
Go to the Tools menu at the top and select Query Tool. Paste in Palsh's SQL script and click the green triangle execute query button. Copy the tourn list. Run the ahk and paste in. Make sure PS is loaded and logged in. Cross fingers. Use at own risk.
I am not computer savy at all but I followed your directions step by step and I have a problem. When I get to the part where you paste PAlsh's SQL script, I put it in the box in the pgaadmin III and press the green play triangle execute query button, but when I press that, it gives me this:

ERROR: syntax error at or near "#"
LINE 1: #SingleInstance, Force
^

********** Error **********

ERROR: syntax error at or near "#"
SQL state: 42601
Character: 1

If anybody can please help me out that would be great????
software to automatically request missing tournament summaries (stars) Quote
08-09-2009 , 04:25 PM
I am also getting an error as well... can anyone help/
software to automatically request missing tournament summaries (stars) Quote
08-09-2009 , 04:33 PM
Reads-

Error at Line 1.

Line text; yb#
Error: This line does not contain a recognized actions.

The program will exit.
software to automatically request missing tournament summaries (stars) Quote
08-20-2009 , 07:23 PM
Hmm, well I get the same problem also.
software to automatically request missing tournament summaries (stars) Quote
08-23-2009 , 03:09 PM
Quote:
Originally Posted by Maryland_Ace
I am not computer savy at all but I followed your directions step by step and I have a problem. When I get to the part where you paste PAlsh's SQL script, I put it in the box in the pgaadmin III and press the green play triangle execute query button, but when I press that, it gives me this:

ERROR: syntax error at or near "#"
LINE 1: #SingleInstance, Force
^

********** Error **********

ERROR: syntax error at or near "#"
SQL state: 42601
Character: 1

If anybody can please help me out that would be great????
It looks like you are pasting the AHK script into pgadmin also? Just paste the SQL script in there to get the list of tourney #s.
software to automatically request missing tournament summaries (stars) Quote
08-23-2009 , 03:15 PM
why won't they make this as a part of PT3?
software to automatically request missing tournament summaries (stars) Quote
08-25-2009 , 12:44 PM
.
software to automatically request missing tournament summaries (stars) Quote
08-27-2009 , 03:22 PM
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
software to automatically request missing tournament summaries (stars) Quote
08-27-2009 , 03:39 PM
If you request a tourn summary before the tourn has finished PT3 shows your position as 1st but with $0.00 prize. To get a list of all such tourns:

Code:
SELECT DISTINCT tourney_no
FROM tourney_holdem_results thr JOIN tourney_holdem_summary ths ON thr.id_tourney = ths.id_tourney
WHERE val_finish = 1 AND amt_won = 0
software to automatically request missing tournament summaries (stars) Quote
08-27-2009 , 04:13 PM
Quote:
Originally Posted by hiho
why won't they make this as a part of PT3?
I believe there are plans to do this but I don't know when it will be added.
software to automatically request missing tournament summaries (stars) Quote

      
m